<depends> applies to the lifecycle of the service.
i.e. It says call create() or start() on the dependent
service before this service.

It has no affect on the configuration which happens
as the files are read. If your properties are read
after the datasource, it won't work.

The ordering is controlled by the deployment
sorter. The default behaviour is based upon the suffix:

   public static final String[] DEFAULT_SUFFIX_ORDER = {
       "sar", "rar", "ds.xml", "service.xml", "jar", "war", "wsr",
"ear", "zip", "last" 
   };

Possible solutions:
1) Put the properties in jboss-service.xml before the
deployment scanner.
2) Put the properties in a sar which is configured before a -ds.xml
3) Put the properties in the -ds.xml before the datasource
4) Use your own deployment sorter configured on the deployment scanner.

Regards,
Adrian

On Wed, 2003-12-03 at 20:43, Nicholas wrote:
> I am trying to take advantage of the "depends" in the
> data source definition files in 3.2.3RC1 and 3.2.3.
> Basically, I want to define the data source properties
> in my system properties and put ${x} tokens in the
> data source definition file. eg.
> <datasources>
>   <local-tx-datasource>
>     <jndi-name>ORACLEDSN</jndi-name>
>    
> <connection-url>${oracle.ds.jdbc.url}</connection-url>
>   
> <driver-class>${oracle.ds.jdbc.driver}</driver-class>
>     <user-name>${oracle.ds.jdbc.username}</user-name>
>     .
>     .
>     .   
> <depends>jboss:type=Service,name=SystemProperties</depends>
>    
>   </local-tx-datasource>
> </datasources>
> 
> etc.
> 
> However, even though the SystemProperties mbean is
> defined in the depends tag, the data source still
> deploys first, making it fail. Once the
> SystemProperties service starts, touching the data
> source file makes it deploy fine.
> 
> This seems inconsistent with dependencies I have used
> with custom MBean deployments in jboss-service.xml
> files.
> 
> Any ideas ?
> 
> Thanks !
> 
> //Nicholas
> 
> 
> 
> =====
> Nicholas Whitehead
> Home: (973) 377 9335
> Cell: (201) 615 2716
> [EMAIL PROTECTED]
> Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by OSDN's Audience Survey.
> Help shape OSDN's sites and tell us what you think. Take this
> five minute survey and you could win a $250 Gift Certificate.
> http://www.wrgsurveys.com/2003/osdntech03.php?site=8
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to