I have written an mbean service that uses the hibernate mbean service.  In 
order to make sure that the hibernate mbean gets loaded prior to my mbean, I am 
using the  elements in the jboss-service.xml, but it does not seem to be 
working.

Here is the jboss-service.xml for the hibernate mbean:

<server>
  |     <mbean code="net.sf.hibernate.jmx.HibernateService" 
name="jboss.jca:service=HibernateFactory,name=HibernateFactory">
  |         
<depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
  |         <attribute 
name="CacheProvider">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
  |         <attribute name="Datasource">java:/DefaultDS</attribute>
  |         <attribute name="DefaultSchema">db2admin</attribute>
  |         <attribute 
name="Dialect">net.sf.hibernate.dialect.DB2Dialect</attribute>
  |         <attribute 
name="JndiName">java:/hibernate/EsmDatabaseFactory</attribute>
  |         <attribute name="MapResources">
  |             com/symantec/esm/data/Account.hbm.xml,
  |             com/symantec/esm/data/Agent.hbm.xml,
  |             com/symantec/esm/data/Domain.hbm.xml,
  |             com/symantec/esm/data/Job.hbm.xml,
  |             com/symantec/esm/data/Keyring.hbm.xml,
  |             com/symantec/esm/data/License.hbm.xml,
  |             com/symantec/esm/data/ManagerCertificate.hbm.xml,
  |             com/symantec/esm/data/Status.hbm.xml,
  |             com/symantec/esm/data/Sticky.hbm.xml
  |         </attribute>
  |         <attribute name="ShowSql">false</attribute>
  |         <attribute 
name="TransactionStrategy">net.sf.hibernate.transaction.JDBCTransactionFactory</attribute>
  |         <attribute name="UserTransactionName">UserTransaction</attribute>
  |     </mbean>
  | </server>

here is the jboss-service.xml for my service mbean:


    
                
<depends>jboss.jca:service=HibernateFactory,name=HibernateFactory</depends>
  |     </mbean>
  | </server>

I expect that when the server starts that the hibernate mbean will do loaded 
first, then my mbean (which uses JNDI to look up the HibernateFactory) will be 
started.  What is happening is that my mbean is being loaded first and it 
promptly fails trying to locate the hibernate factory.  Afterwords, the 
Hibernate service gets started.

If I remove my service.sar file, the server starts up normally, at which point 
I can drop service.sar into the deploy directory and it works fine.

Anyone see the problem?

Thanks in advance for any light that can be shed for me on this!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862639#3862639

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862639


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to