1 Reply Latest reply on Jan 10, 2008 1:18 PM by Konstantin Pupkov

    hibernate SessionFactory lookup return null

    Konstantin Pupkov Newbie

      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.