Following the instructions on the JBoss Wiki (
http://www.jboss.org/wiki/Wiki.jsp?page=JBossHibernate) I get the following error:
Code:
15:56:05,977 INFO [EjbModule] Deploying PropertyManagementSession
15:56:06,060 WARN [EjbModule] Could not load the org.jboss.hibernate.session.EjbInterceptor interceptor for this container
net.sf.hibernate.HibernateException: Hibernate service is not registered: jboss.har:service=Hibernate
at org.jboss.hibernate.session.SessionContext.resolveSessionFactory(SessionContext.java:299)
at org.jboss.hibernate.session.SessionContext.<init>(SessionContext.java:102)
at org.jboss.hibernate.session.SessionContext.<init>(SessionContext.java:86)
at org.jboss.hibernate.session.EjbInterceptor.importXml(EjbInterceptor.java:57)
at org.jboss.ejb.EjbModule.addInterceptors(EjbModule.java:860)
at org.jboss.ejb.EjbModule.initializeContainer(EjbModule.java:743)
at org.jboss.ejb.EjbModule.createStatelessSessionContainer(EjbModule.java:547)
at org.jboss.ejb.EjbModule.createContainer(EjbModule.java:502)
at org.jboss.ejb.EjbModule.createService(EjbModule.java:316)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:237)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:219)
....
This error comes after adding the following into standardjboss.xml :
Code:
<container-name>Hibernate Stateless SessionBean</container-name>
<call-logging>true</call-logging>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
<!-- CMT -->
<interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</int
erceptor>
<interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins
.MetricsInterceptor</interceptor>
<interceptor transaction="Container">org.jboss.ejb.plugins.StatelessSessionInsta
nceInterceptor</interceptor>
<!-- BMT not feasible using Hibernate interceptor with 'transaction' scope!!!! -
->
<!-- Notice that the service name is the same as that used to define the MBean -
->
<interceptor service="jboss.har:service=Hibernate" scope="transaction">org.jboss
.hibernate.session.EjbInterceptor</interceptor>
</container-interceptors>
</container-configuration>
-----
my jboss.xml inside the .ear has the following entry (for the SSB I'm using) :
Code:
<session>
<ejb-name>PropertyManagementSession</ejb-name>
<jndi-name>rpmaster.server.session.PropertyManagementSession</jndi-name>
<local-jndi-name>local/rpmaster.server.session.PropertyManagementSession</local-jndi-name>
<configuration-name>Hibernate Stateless SessionBean</configuration-name>
</session>
-------
my jboss-service.xml inside my Hibernate.har file looks like this :
Code:
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
<attribute name="DatasourceName">java:/PostgresDS</attribute>
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.PostgreSQLDialect</attribute>
<attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
<attribute name="Hbm2ddlAuto">create-drop</attribute>
</mbean>
and the .har file itself has the following structure :
+ jboss-service.xml
+ my
+ project
+path
|--- class1.hbm.xml
|--- class1.class
...
------------
inside my EAR, the jboss-app.xml has the following :
Code:
<jboss-app>
<loader-repository>rpmaster:loader=rpmaster.ear</loader-repository>
<module><har>Hibernate.har</har></module>
</jboss-app>
and of course that archive is included in the EAR.
--------------
I am using JBoss3.2.6RC1 . I DID update the 2 files hibernate-deployer-service.xml and jboss-hibernate.jar . Anyone have any idea how I get JBoss to register the "Hibernate" service ?
THanks in Advance
S3ma4