ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Configuring JBoss 4.0 JDBC Connectivity
Subject:   SQL Server 2000
Date:   2005-03-30 20:18:39
From:   kalparser
Response to: SQL Server 2000

The Hibernat-service.xml is like this:
<server>
<mbean code="org.jboss.hibernate.jmx.Hibernate"
name="jboss.har:service=Hibernate">
<attribute name="DatasourceName">java:MSSQLDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.HSQLDialect</attribute>
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="CacheProviderClass">
net.sf.hibernate.cache.HashtableCacheProvider
</attribute>
</mbean>
</server>


And I create the session from a session bean:
SessionFactory sf = (SessionFactory)ctx.lookup("java:/hibernate/SessionFactory");


I got exception as below:
javax.naming.NameNotFoundException: hibernate
not bound



Need help urgently!!
Thanks!