-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Seven day's difficult :get sessionFactory Object with JNDI
PostPosted: Sat May 22, 2004 12:53 am 
Newbie

Joined: Sat May 22, 2004 12:12 am
Posts: 1
Location: China
After I bind the hibernate sessionFactory object into Weblogic succuessfully, I cannot use the JNDI to get the sessionFactory, Why????

I have test with MSSQLServer and MySQL, the problem is still, so I think it does not have something with database system, and I saw the reference address of the sessionFactory instance in the View of Weblogic JNDI. Now the problem is I cannot get the sessionFactory object with JNDI.

Following is the code of get sessionFactory object:
Code:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
    props.put(Context.PROVIDER_URL, "t3://yulin:7001");

    Object o = null;
    try {
      Context ctx = new InitialContext(props);
      o = ctx.lookup("hibernate/session_factory");
    }
    catch (NamingException ex) {
    }
    System.out.println(o);


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 22, 2004 5:15 am 
Senior
Senior

Joined: Fri Nov 21, 2003 5:55 am
Posts: 155
I'm not specalist for Weblo, I only work 3 times with but do youconfigure the JNDI service into weblogig.
I'm not sure but I think you must do that before with the wls console.

Could you read this link, it give lots of informations about :

http://blogs.atlassian.com/scuttlebutt/ ... 00201.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.