Hi,
I'm using JBoss 4.2.3GA and am attempting to use the hibernate mbean to provide JNDI
access to a hibernate SessionFactory. I'm having some problems in that when I look up
the SessionFactory object via JNDI, the object returned is null. So, in trying to figure
out why, I'm noticing something in the app server console that I am curious about so I
was wondering what it means:
| 22:42:56,484 INFO [SettingsFactory] Echoing all SQL to stdout
| 22:42:56,484 INFO [SettingsFactory] Statistics: disabled
| 22:42:56,484 INFO [SettingsFactory] Deleted entity synthetic identifier rollbac
| k: disabled
| 22:42:56,484 INFO [SettingsFactory] Default entity-mode: pojo
| 22:42:56,484 INFO [SettingsFactory] Named query checking : enabled
| 22:42:56,515 INFO [SessionFactoryImpl] building session factory
| 22:42:56,656 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no
| JNDI name configured
| 22:42:56,656 INFO [SchemaExport] Running hbm2ddl schema export
| 22:42:56,656 INFO [SchemaExport] exporting generated schema to database
| 22:42:56,656 INFO [SchemaExport] schema export complete
| 22:42:56,656 INFO [NamingHelper] JNDI InitialContext properties:{}
| 22:42:56,656 INFO [Hibernate] SessionFactory successfully built and bound into
| JNDI [java:/hibernate/ExampleSessionFactory]
|
Ok so what's confusing is the INFO that says: Not biding factory to JNDI, no JNDI name
configured.
Then the last line states something that seems contradictory:
SessionFactory successfully built and bound into JNDI
[java:/hibernate/ExampleSessionFactory]
Am I not understanding something? Any insight would be appreciated. Here's my
jboss-service.xml file for the har.
| <server>
| <mbean code="org.jboss.hibernate.jmx.Hibernate"
name="jboss.har:service=Hibernate">
| <attribute
name="DatasourceName">java:/DefaultDS</attribute>
| <attribute
name="Dialect">org.hibernate.dialect.HSQLDialect</attribute>
| <attribute
name="SessionFactoryName">java:/hibernate/ExampleSessionFactory</attribute>
| <attribute name="Hbm2ddlAuto">create-drop</attribute>
| <attribute name="ShowSqlEnabled">true</attribute>
| </mbean>
| </server>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173491#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...