-
1. Re: How does property substitution work for the jboss-esb.xm
tschungelbuch Oct 14, 2008 8:36 AM (in response to tschungelbuch)Is there anybody out there who has ever done this?
Help would be very much appreciated!
I try to find documentation, surf the forums but am just not successful.
Kind regards
Tschungelbuch -
2. Re: How does property substitution work for the jboss-esb.xm
kconner Oct 14, 2008 10:16 AM (in response to tschungelbuch)The properties are substituted in the jboss-esb.xml when the esb artifact is deployed.
Any property in a text or attribute value section will be replaced.
If you want to use properties-service.xml then you must make sure that it executes *before* the esb artifacts are deployed otherwise the system properties will not have been initialised. -
3. Re: How does property substitution work for the jboss-esb.xm
tschungelbuch Oct 14, 2008 11:11 AM (in response to tschungelbuch)Dear Kevin
Thank you for the reply.
I have created a property file in the conf directory:
[org.jboss.varia.property.SystemPropertiesService] Loaded system properties from: file:/opt/jboss/server/gscf/conf/oraclequeue.
properties
So it is loaded and contains the following values:stx.aq.user=username
in my jboss-esb.xml I have:<property name="java.naming.oracle.aq.user" value="${stx.aq.user}"/>
But when the *.esb is deployed I get the error:
2008-10-14 16:58:00,227 ERROR [org.jboss.soa.esb.oracle.aq.AQInitialContextFactory] JMSException exception
javax.jms.JMSSecurityException: JMS-232: An invalid user/password was specified for the JMS connection
Where did I miss something?
Thank you for your help.
Kind regards
Tschungelbuch -
4. Re: How does property substitution work for the jboss-esb.xm
tschungelbuch Oct 14, 2008 12:23 PM (in response to tschungelbuch)As of which version the JBoss ESB supports property substitution in the jboss-esb.xml?
-
5. Re: How does property substitution work for the jboss-esb.xm
kconner Oct 14, 2008 12:38 PM (in response to tschungelbuch)IIRC they were added between 4.2 and 4.3, so 4.3 is probably the first version with them in.
What happens if you specify the properties in the run.conf? Does it work?
I'll take a look at the code and see if there is anything obvious that will prevent this from working. -
6. Re: How does property substitution work for the jboss-esb.xm
kconner Oct 14, 2008 12:43 PM (in response to tschungelbuch)BTW Where are you deploying the property service MBean?
As you want to use it in in deployment you should probably be including it in the conf/jboss-service.xml. -
7. Re: How does property substitution work for the jboss-esb.xm
tschungelbuch Oct 15, 2008 5:13 AM (in response to tschungelbuch)Dear Kevin
I have asked our IT Services team to upgrade my development environment to the latest version of the ESB.
The property service MBean is in the deploy/property-service.xml.
Is there another one than<mbean code="org.jboss.varia.property.SystemPropertiesService" name="jboss:type=Service,name=SystemProperties">
I will try run.conf only if it would not work with the new ESB version.
Thank you and kind regards
Tschungelbuch -
8. Re: How does property substitution work for the jboss-esb.xm
kconner Oct 15, 2008 5:28 AM (in response to tschungelbuch)If you are running a SOA platform then you will already have support for this, but with the ESB project you need 4.3 or 4.4.
I do not believe that putting the property service in deploy will work correctly as this service should be initialised along side any esb artifacts that are being deployed. As a consequence the properties will not have been set before the jboss-esb.xml file is parsed. You need to get those properties set *before* the esb deployment takes place.
If you have the right versions of ESB/SOA-P then you can easily verify the property substitution by setting the properties (temporarily) in run.conf. Once you have verified this you should add the definition of the SystemPropertiesService MBean into the conf/jboss-service.xml so that it is running before the scanner initialises the artifacts under the deploy directory.
Kev -
9. Re: How does property substitution work for the jboss-esb.xm
tschungelbuch Oct 16, 2008 10:10 AM (in response to tschungelbuch)We have the SOA platform version [SOA_4.2.0.GA_CP02], but how do I find out the version of the ESB?
-
10. Re: How does property substitution work for the jboss-esb.xm
kconner Oct 16, 2008 10:51 AM (in response to tschungelbuch)All SOA platform releases have property substitution so it is just down to configuration.
The properties need to be set when the deployer reads the jboss-esb.xml file otherwise the modifications will not be applied. Have you tried specifying the property in run.conf? If this works, can you try declaring the MBean in the conf/jboss-service.xml file? -
11. Re: How does property substitution work for the jboss-esb.xm
tschungelbuch Oct 16, 2008 10:54 AM (in response to tschungelbuch)I have put the properties into run.conf without success.
-
12. Re: How does property substitution work for the jboss-esb.xm
kconner Oct 16, 2008 10:57 AM (in response to tschungelbuch)Okay, can you run through the changes you have made?
Which files have you changed? What modifications were made? -
13. Re: How does property substitution work for the jboss-esb.xm
tschungelbuch Oct 16, 2008 12:13 PM (in response to tschungelbuch)Currently I have the following entries in bin/run.conf:
STX_AQ_USER=user_name STX_AQ_PASSWORD=password STX_AQ_SERVER=db.int.server.com STX_AQ_INSTANCE=dbtest STX_AQ_SCHEMA=schema_name STX_AQ_PORT=1521 STX_AQ_DRIVER=thin
and the jboss-esb.xml in the *.esb artifact<jms-provider name="JBossOracleQ" connection-factory="QueueConnectionFactory"> <property name="java.naming.factory.initial" value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/> <property name="java.naming.oracle.aq.user" value="${STX_AQ_USER}"/> <property name="java.naming.oracle.aq.password" value="${STX_AQ_PASSWORD}"/> <property name="java.naming.oracle.aq.server" value="${STX_AQ_SERVER}"/> <property name="java.naming.oracle.aq.instance" value="${STX_AQ_INSTANCE}"/> <property name="java.naming.oracle.aq.schema" value="${STX_AQ_SCHEMA}"/> <property name="java.naming.oracle.aq.port" value="${STX_AQ_PORT}"/> <property name="java.naming.oracle.aq.driver" value="${STX_AQ_DRIVER}"/> <jms-bus busid="quickstartGwChannel"> <jms-message-filter dest-type="QUEUE" dest-name="ACTION_REQUEST" /> </jms-bus> <jms-bus busid="quickstartEsbChannel"> <jms-message-filter dest-type="QUEUE" dest-name="B" /> </jms-bus> </jms-provider>
-
14. Re: How does property substitution work for the jboss-esb.xm
kconner Oct 16, 2008 12:30 PM (in response to tschungelbuch)Okay, so you have lines like the following?
JAVA_OPTS="$JAVA_OPTS -DSTX_AQ_USER=user_name"
Are you also running against a default instance or is it the production one?