[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - hibernate SessionFactory lookup return null
goodidea
do-not-reply at jboss.com
Wed Jan 9 03:04:37 EST 2008
My hibernate-service.xml
| <server>
| <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
| <attribute name="DatasourceName">java:/reqDS</attribute>
| <attribute name="Dialect">org.hibernate.dialect.MySQL5InnoDBDialect</attribute>
| <attribute name="ShowSqlEnabled">true</attribute>
| <attribute name="SessionFactoryName">hibernate/SessionFactory</attribute>
| </mbean>
| </server>
|
req.har successfully loaded.
In my swing client I am trying to lookup "SessionFactory"
| InitialContext ctx=new InitialContext();
| Object obj=ctx.lookup("java:/hibernate/SessionFactory");
|
obj is ALWAYS NULL. Help please.
Release ID: JBoss [Trinity] 4.2.1.GA,
Hibernate-Version: 3.2.4.sp1
ctx.list("") return all my jndi Objects properly, and hibernate also in that list.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118150#4118150
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118150
More information about the jboss-user
mailing list