-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: MBean example for use with Tomcat?
PostPosted: Thu Jan 15, 2004 3:55 pm 
Newbie

Joined: Fri Dec 12, 2003 1:27 pm
Posts: 10
Hi All,

I'd like to use an MBean to configure Hibernate on Tomcat. I can only find examples of MBeans for use with JBoss, so I'm not sure which attributes/values are needed for use with Tomcat. Is there anyone who's done this and could share/explain their Tomcat MBean configuration, or point me to some relevant documentation?

Thanks,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 4:35 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
How will you deploy an MBean without an MBean server?

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 4:58 pm 
Newbie

Joined: Fri Dec 12, 2003 1:27 pm
Posts: 10
I'm new to this so maybe I'm misunderstanding it, but doesn't Tomcat 4 support JMX MBeans? I can configure the MBean in my Tomcat server.xml and provide an mbean-descriptor.xml file as is discussed here: http://jakarta.apache.org/tomcat/tomcat ... howto.html

So if that's correct so far, what I'm wondering is what are the appropriate values for the mbean-descriptor.xml when using Hibernate on Tomcat. For instance, a JBoss example shows the following configuration, what values would I use for instance in place of these Jboss specifics:

<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,
name=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=MySqlDS</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources">mappings/Attribute.hbm.xml</attribute>
<attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
<attribute name="Datasource">java:/MySqlDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
</mbean>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 4:59 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Frankly, I don't know. I also fail to see why this is better than the traditional (much more flexible) configuration.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 5:43 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
A couple of months ago I tried to deploy MBeans on Tomcat 4.1.x. Couldn't get it to work. I finally decided to use JBoss 3.2.3 with Tomcat 5.0.16 running as a SAR. Works like a champ. Just deployed our first installation ten minutes ago. :)

I haven't checked to see if Tomcat 5's MBean support is any better than 4. Doesn't matter. JBoss does it all...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.