2 Replies Latest reply on Nov 19, 2010 11:10 AM by Bruno HALEBLIAN

    Varia SystemProperties not yet set at startup time?

    Bruno HALEBLIAN Newbie

      Hello all,

       

      I am using jboss-5.1.0.GA-jdk6 and jboss-ejb3-plugin-1.0.19

      I'm referencing systemproperties in deployment descriptors.

       

      This way :

      <enterprise-beans>
              <message-driven>
                  <ejb-name>MDBDumpOrange</ejb-name>
                  <ejb-class>com.carrefour.labs.MDBDumpToFile</ejb-class>
                  <activation-config>
                      <activation-config-property>
                          <activation-config-property-name>useJNDI</activation-config-property-name>
                          <activation-config-property-value>false</activation-config-property-value>
                      </activation-config-property>
                      <activation-config-property>
                          <activation-config-property-name>destinationType</activation-config-property-name>
                          <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
                      </activation-config-property>
                      <activation-config-property>
                          <activation-config-property-name>destination</activation-config-property-name>
                          <activation-config-property-value><![CDATA[${MDBTestMQ.destination}]]></activation-config-property-value>
                      </activation-config-property>
                      <activation-config-property>
                          <activation-config-property-name>hostName</activation-config-property-name>
                          <activation-config-property-value><![CDATA[${MDBTestMQ.hostName}]]></activation-config-property-value>
                      </activation-config-property>
                      <activation-config-property>
                          <activation-config-property-name>port</activation-config-property-name>
                          <activation-config-property-value><![CDATA[${MDBTestMQ.port}]]></activation-config-property-value>
                      </activation-config-property>
                      <activation-config-property>
                          <activation-config-property-name>queueManager</activation-config-property-name>
                          <activation-config-property-value><![CDATA[${MDBTestMQ.queueManager}]]></activation-config-property-value>
                      </activation-config-property>
                  </activation-config>

       

      Those systemProperties, defined in a varia systemProperties file are correctly set if I deploy into a running JBoss

      BUT they ar NOT if My ear is in deploy directory when jboss starts up.

       

      Log extract :

      ...

      Caused by: javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '${MDBTestMQ.hostName}:${MDBTestMQ.queueManager}'

      ...

       

      Another workaround is to define properties on comand line but it does not meet my requirements.

       

       

      I've been trying to place

      <depends>jboss:type=Service,name=SystemProperties</depends>

       

      But did fail.

       

      Any ideas?

      Thanks.

       

      Regards