Just tried in JBoss 4.0RC2. It appear to mainly included here too, but have not got it to work yet.
1) EhCacheProvider not in the hibernate2.jar shipped with JBoss. The hibernate2.jar must therefore be older than hibernate 2.1.5.
So I replaced the hibernate2.jar with that from 2.1.6
2) I did everything else. HibernateService and HARDeployer start OK. HibernateService is in JNDI at usual place. However, when my EJB looks up the HibernateService, I get an IllegalStateException runtime exception which I catch and log as below.
Code:
2004-09-08 20:35:57,109 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [EisTransactionManagerLocal] createTransaction(com.eftwire.torrent.component.eis.server.EisTransactionInfo@d5c166)
2004-09-08 20:35:57,109 DEBUG [org.jboss.hibernate.session.EjbInterceptor] EjbInterceptor intercepted method invocation : public abstract com.eftwire.torrent.component.eis.server.EisTransactionInfo com.eftwire.torrent.component.eis.interfaces.EisTransactionManagerLocal.createTransaction(com.eftwire.torrent.component.eis.server.EisTransactionInfo)
2004-09-08 20:35:57,109 INFO [org.jboss.hibernate.session.SessionContextHelper] Generating Hibernate session for scoped bind []
2004-09-08 20:35:57,109 DEBUG [net.sf.hibernate.impl.SessionImpl] opened session
2004-09-08 20:35:57,109 DEBUG [org.jboss.hibernate.session.SessionContext] Session [net.sf.hibernate.impl.SessionImpl@1ca04be] being bound to []
2004-09-08 20:35:57,109 DEBUG [org.jboss.hibernate.session.store.TransactionSessionStorage$TransactionSynch] Preparing synch to manage session [net.sf.hibernate.impl.SessionImpl@1ca04be, true]
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@26a690, cl=org.jboss.mx.loading.UnifiedClassLoader3@1fd56dc{ url=null ,addedOrder=0}
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@26a690, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@151c208{ url=null ,addedOrder=0}
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@26a690, cl=org.jboss.mx.loading.UnifiedClassLoader3@99c1d9{ url=null ,addedOrder=0}
2004-09-08 20:35:57,109 INFO [com.eftwire.torrent.component.eis.server.EisTransactionManagerBean] Enter: createTransaction
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@26a690, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@85c128{ url=null ,addedOrder=0}
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
2004-09-08 20:35:57,109 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@26a690, cl=org.jboss.mx.loading.UnifiedClassLoader3@14c3ee7{ url=null ,addedOrder=0}
2004-09-08 20:35:57,109 ERROR [com.eftwire.torrent.component.eis.server.EisTransactionManagerBean] SessionFactory with name [java:/hibernate/SessionFactory] not yet registered with SessionContext
java.lang.IllegalStateException: SessionFactory with name [java:/hibernate/SessionFactory] not yet registered with SessionContext
at org.jboss.hibernate.session.SessionContext.getStorage(SessionContext.java:135)
at org.jboss.hibernate.session.SessionContext.getSession(SessionContext.java:43)
at com.eftwire.torrent.component.eis.server.EisTransactionManagerBean.createTransaction(EisTransactionManagerBean.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.ejb.plugins.AbstractInterceptor.invoke(AbstractInterceptor.java:96)
at org.jboss.hibernate.session.EjbInterceptor.invoke(EjbInterceptor.java:81)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:365)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:859)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:82)
at $Proxy84.createTransaction(Unknown Source)
at com.eftwire.torrent.component.eis.server.TopupRequestHandler.handle(TopupRequestHandler.java:59)
at com.eftwire.torrent.component.eis.server.EisRequestBean.handle(EisRequestBean.java:59)
at com.eftwire.torrent.platform.jms.AbstractTorrentMessageBean.onMessage(AbstractTorrentMessageBean.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:87)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:93)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
at org.jboss.ejb.Container.invoke(Container.java:859)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:920)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1213)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:877)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
at org.jboss.mq.SpySession.run(SpySession.java:351)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
at java.lang.Thread.run(Thread.java:534)
Is there something different (from the current wiki page) that I must do to use this update ?