sgwood wrote:
Did you deploy the MBean?
Sherman
You did not answer me.
Did you put the Hibernate MBean in the JBoss deployment directory?
Do you see it deploying in the server.log? You should see entries like:
2004-06-25 06:03:52,625 INFO [net.sf.hibernate.jmx.HibernateServiceMBean] starting service at JNDI name: java:/LumenaHibernateFactory3
2004-06-25 06:03:52,625 INFO [net.sf.hibernate.jmx.HibernateServiceMBean] service properties: {hibernate.session_factory_name=java:/LumenaHibernateFactory3, hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.show_sql=false, hibernate.use_outer_join=true, hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory, hibernate.connection.datasource=java:/Hibernate3, jta.UserTransaction=UserTransaction}
2004-06-25 06:03:52,687 INFO [net.sf.hibernate.cfg.Environment] Hibernate 2.1.2
2004-06-25 06:03:52,687 INFO [net.sf.hibernate.cfg.Environment] hibernate.properties not found
2004-06-25 06:03:52,687 INFO [net.sf.hibernate.cfg.Environment] using CGLIB reflection optimizer
2004-06-25 06:03:52,703 INFO [net.sf.hibernate.cfg.Configuration] Mapping resource: com/semanticworks/lumena/test/crossreference/hibernate/ItemMasterItem.hbm.xml
2004-06-25 06:03:52,875 INFO [net.sf.hibernate.cfg.Binder] Mapping class: com.semanticworks.lumena.test.crossreference.hibernate.ItemMasterItem -> ItemMasterItem
...
2004-06-25 06:03:53,578 INFO [net.sf.hibernate.dialect.Dialect] Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
2004-06-25 06:03:53,578 INFO [net.sf.hibernate.cfg.SettingsFactory] Use outer join fetching: true
2004-06-25 06:03:53,625 INFO [net.sf.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2004-06-25 06:03:53,625 INFO [net.sf.hibernate.connection.DatasourceConnectionProvider] Using datasource: java:/Hibernate3
2004-06-25 06:03:53,640 INFO [net.sf.hibernate.transaction.TransactionFactoryFactory] Transaction strategy: net.sf.hibernate.transaction.JTATransactionFactory
2004-06-25 06:03:53,640 INFO [net.sf.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2004-06-25 06:03:53,640 INFO [net.sf.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
2004-06-25 06:03:53,640 INFO [net.sf.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup
2004-06-25 06:03:53,640 INFO [net.sf.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2004-06-25 06:03:53,640 INFO [net.sf.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
2004-06-25 06:03:53,640 INFO [net.sf.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup
2004-06-25 06:03:55,171 INFO [net.sf.hibernate.cfg.SettingsFactory] Use scrollable result sets: true
2004-06-25 06:03:55,171 INFO [net.sf.hibernate.cfg.SettingsFactory] Use JDBC3 getGeneratedKeys(): false
2004-06-25 06:03:55,171 INFO [net.sf.hibernate.cfg.SettingsFactory] Optimize cache for minimal puts: false
2004-06-25 06:03:55,171 INFO [net.sf.hibernate.cfg.SettingsFactory] Query language substitutions: {}
2004-06-25 06:03:55,171 INFO [net.sf.hibernate.cfg.SettingsFactory] cache provider: net.sf.ehcache.hibernate.Provider
2004-06-25 06:03:55,171 INFO [net.sf.hibernate.cfg.Configuration] instantiating and configuring caches
2004-06-25 06:03:55,281 INFO [net.sf.hibernate.impl.SessionFactoryImpl] building session factory
2004-06-25 06:03:55,812 INFO [net.sf.hibernate.impl.SessionFactoryObjectFactory] Factory name: java:/LumenaHibernateFactory3
2004-06-25 06:03:55,812 INFO [net.sf.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2004-06-25 06:03:55,812 INFO [net.sf.hibernate.impl.SessionFactoryObjectFactory] Bound factory to JNDI name: java:/LumenaHibernateFactory3
2004-06-25 06:03:55,812 WARN [net.sf.hibernate.impl.SessionFactoryObjectFactory] InitialContext did not implement EventContext
2004-06-25 06:03:55,812 INFO [net.sf.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
Note the factory name etc. This is what you should be looking up via your InitialContext.
Sherman