1 Reply Latest reply on Jun 16, 2004 3:38 PM by crosenbury

    Getting a sar to depend on a jdbc connection

    crosenbury Newbie

      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:

       <mbean code="wachovia.cmg.evergreen.productmaster.ProductMasterService"

      and a jdbc connection:

      {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.


      Chris Rosenbury

        • 1. Re: Getting a sar to depend on a jdbc connection
          crosenbury Newbie

          OK, I finally figured it out.

          Here is what I had to do:

          in the service.xml file, I had to add the following:


          I had tried this, but had the service/name flipped because that is the way it appeard in the jmx-console. I finally found a reference on the hibernate site that describes using hibernate as a service in JBoss.