Hello,
I am using JBoss 4.0.3SP, EJB3.0 Hibernate3.1
and I am trying to create a Hibernate Archive (har). My problem is that the SessionFactory that I am trying to retrieve is not bound. I have searched the forums for a solution, but didn't find anything.
I am confused in some issues.
1) Should my mbean that I am trying to create should be called jboss-service.xml or hibernate-service.xml
2) Do I need to modify anything in the persistence.properties file located in
jboss-4.0.3SP1\server\all\deploy\ejb3.deployer\META-INF
3) Even though I have more than one hbm.xml file in the .har only the first one is being displayed in the console as found
4) When Jboss starts I always get the following error, which I don't know if iit is signifcant to my problem
13:25:40,640 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=/0.0.0.0
13:25:40,640 WARN [HANamingService] Failed to start AutomaticDiscovery
java.net.SocketException: error setting options
at java.net.PlainDatagramSocketImpl.join(.........
.........
13:25:42,203 WARN [TreeCache] No transaction manager lookup class has been defined. Transactions cannot be used........
I have put the ........... so I won't cluter the screen.
Your help is greatly appreciated.
Zoe Tsekas
jboss-service.xml file contents
<server>
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
<attribute name="DatasourceName">java:/MySqlDS</attribute>
<attribute name="Dialect">org.hibernate.dialect.MySQLInnoDBDialect</attribute>
<attribute name="SessionFactoryName">java:/hibernate/MesitisSessionFactory</attribute>
<attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
<attribute name="Hbm2ddlAuto">create-drop</attribute>
<attribute name="ShowSqlEnabled">true</attribute>
</server>
persistence.properties file contents
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.connection.release_mode=after_statement
hibernate.transaction.flush_before_completion=false
hibernate.transaction.auto_close_session=false
hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory
hibernate.hbm2ddl.auto=create-drop
#hibernate.hbm2ddl.auto=create
hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
# Clustered cache with TreeCache
#hibernate.cache.provider_class=org.jboss.ejb3.entity.TreeCacheProviderHook
#hibernate.treecache.mbean.object_name=jboss.cache:service=EJB3EntityTreeCache
hibernate.connection.datasource=java:/DefaultDS
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.jndi.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
|