read config from system environment

40 views
Skip to first unread message

soltani...@gmail.com

unread,
Feb 17, 2026, 7:53:06 AM (7 days ago) Feb 17
to jPOS Users

Hello,

I want to read the IP address from the system environment in the following file, which is related to jPOS.

In other words, I want to set the values in the operating system environment variables and have them applied automatically in the jPOS configuration file.

<?xml version="1.0" ?>
<channel-adaptor name='bank1-channel-adaptor'
 class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel name="nelito-channel"
 class="org.jpos.iso.channel.ASCIIChannel" logger="Q2"
 packager="com.en.datavsn.EFTswitch.atm.common.ShetabISO87APackager">
<property name="host" value="${HOST}" />
<property name="port" value="9999" />
</channel>
<!--Code Added for Echo Message between Switch and HIF wrt Issue#4373 on 12-Feb-2014 -->
<in>bank1-send</in>
<out>bank1-receive</out>
<space>tspace:default</space>
<reconnect-delay>30000</reconnect-delay>
</channel-adaptor>

Thanks

Gregorio Osorio

unread,
Feb 17, 2026, 8:44:05 AM (7 days ago) Feb 17
to jpos-...@googlegroups.com
Hi!

Before starting the jPOS application, make sure to set and export the environment variable:

$ export HOST=<the-ip-of-your-host>

After setting the variable, you can start the application:

$ ./q2

For more details, please refer to the documentation: https://jpos.org/docs/tutorial/qbean/configuration/#environments.

Best regards,

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jpos-users/ee0b68f1-7466-45c7-8c3d-e6198eb85ee8n%40googlegroups.com.


--
Gregorio Osorio

soltani...@gmail.com

unread,
Feb 17, 2026, 8:58:58 AM (7 days ago) Feb 17
to jPOS Users

I start jPOS inside Oracle WebLogic Server.

My goal is to deploy the application on Kubernetes and have the configuration files loaded from HashiCorp Vault.

Do you have a suitable solution for this?

Alternatively, if the configuration can also be read from the operating system environment variables, that would solve my problem as well.
Thanks

Singleton
@Startup
public class JposService {

private Q2 q2;
private Logger logger = LoggerFactory.getLogger(JposService.class.getName());
public static final String SWITCH_CONFIG_PATH = System.getenv().get("SWITCH_CONFIG_PATH");

@PostConstruct
private void inti() {
q2 = new Q2(new String[]{"-d", SWITCH_CONFIG_PATH + "/q2/deploy"});
startQ2();
}

public void startQ2() {

q2.start();
logger.info("Q2 has been started");
}

@PreDestroy
private void preDestroy() {
q2.shutdown();
logger.info("Q2 has been stopped");
}
}

soltani...@gmail.com

unread,
Feb 17, 2026, 9:01:32 AM (7 days ago) Feb 17
to jPOS Users
Thanks , this link is for jpos EE,


I start jPOS inside Oracle WebLogic Server.


On Tuesday, February 17, 2026 at 5:14:05 PM UTC+3:30 Gregorio Osorio wrote:
Reply all
Reply to author
Forward
0 new messages