I have looked for an example of this, and it either doesn't exist, or I can't figure out how to search for the right thing.
I have a sar:
<server>
<mbean code="wachovia.cmg.evergreen.productmaster.ProductMasterService"
name=":service=ProductMaster">
<depends>jboss:service=HibernateAccess</depends>
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:name=jdbc/ProductMaster,service=ManagedConnectionPool</depends>
</mbean>
</server>
and a jdbc connection:
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/ProductMaster</jndi-name>
<connection-url>
jdbc:jtds:sqlserver://server:1433/dbname;SelectMethod=Cursor
</connection-url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
</local-tx-datasource>
</datasources>
{business specifics removed from the database connection}
When I start the server, and deploy the service when the server is running, it finds the datasource, and works fine.
If I restart the server with the sar already deployed, it cannot find the database connection, i presume because it has not loaded yet.
I have tried using depends clauses for the managed connection pool, the managed connection factory, the rar deployer, and combinations of all three. Nothing seems to work.
I would appreciate either a pointer to an example that does this, or some info on what exactly I should be depending on.
Thanks,
Chris Rosenbury