1 2 Previous Next 17 Replies Latest reply on Jan 27, 2015 8:21 AM by kchintoju Go to original post
      • 15. Re: Set properties file in jboss7
        zbedell

        It's a module so that it's available server-wide (to all EAR, etc. deployments), but it won't auto-start.  You need a reference to it in your jboss-service.xml in a SAR or EAR in order to actually instantiate it.  In theory, multiple SAR's could instance it under different names which is how we end up using it.

        • 16. Re: Set properties file in jboss7
          robc4

          varsha,

           

          Did you ever get this working?  I am having the exact same issue.

           

          Thanks,

          Rob

          • 17. Re: Set properties file in jboss7
            kchintoju

            1. Pass Property File as Startup Parameter

            ./standalone-rebel.sh  --properties=/Users/john.galt/dev/config/ds/jboss.properties 

            If these properties are read, they will be rendered in the server log as the first statement.

            23:58:41,626 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.2.0.GA  (AS 7.3.0.Final-redhat-14) starting 23:58:41,633 DEBUG [org.jboss.as.config] (MSC service thread 1-6) Configured system    properties: DSsettings.connection_url = property_value DSsettings.user_name=property_value password=value     [Standalone] =     awt.nativeDoubleBuffering = true     awt.toolkit = apple.awt.CToolkit 

            NOTE: As these settings are logged in server log, ensure no clear text passwords are in the property files in production

            2. Use passed in system properties

            You could use these system properties with following syntax.

            Example Usage in a data source file

            <?xml version="1.0" encoding="UTF-8"?>

            <datasources xmlns="http://www.jboss.org/ironjacamar/schema">        

            <xa-datasource jndi-name="java:jboss/integrationsDS" pool-name="integrationConnectionPool" jta="true" enabled="true" use-ccm="true">                     <xa-datasource-property name="URL">                            

                 ${DSsettings.connection_url}                    

                 </xa-datasource-property>                 

            <driver>oracle</driver>                   

            <xa-pool>                       

            <is-same-rm-override>false</is-same-rm-override>

                                    <interleaving>false</interleaving>

                                     <pad-xid>false</pad-xid>

                                     <wrap-xa-resource>false</wrap-xa-resource>

                                 </xa-pool>

                                 <security>

                                         <user-name>${DSsettings.user-name}</user-name>

                                         <password>${DSsettings.password}</password>

                                 </security>

                                 <validation>

                                     <validate-on-match>false</validate-on-match>

                                     <background-validation>false</background-validation>

                                 </validation>

                                 <statement>

                                     <share-prepared-statements>false</share-prepared-statements>

                                 </statement>

                             </xa-datasource>

            </datasources>

            1 2 Previous Next