-->
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: Any alternative for JBoss and Remote Hibernate Session??
PostPosted: Thu Jul 13, 2006 12:10 pm 
Newbie

Joined: Thu Jul 13, 2006 11:57 am
Posts: 5
Hello,

In some previous posts I red that a SessionFactory in JBoss can not be retrieved remotely via JNDI from an external J2EE client application but it is normally retrieved locally. An attemp to do so would return null or NamingException.

My application has both J2EE clients and Web apps that need to make Sessions from this SessionFactory. What would be the solution for doing this?


thanx in advance


Last edited by hatg on Thu Jul 13, 2006 10:51 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 13, 2006 10:31 pm 
Beginner
Beginner

Joined: Tue May 23, 2006 4:10 pm
Posts: 38
Location: Charleston, SC
I'm more of a weblogic expert than jboss so I cannot confirm or deny reports of JNDI lookup failures when trying to fetch a session factory from the JNDI tree on jboss (it works for us on weblogic). I never believe what I read, I always confirm online reports of failures with my own tests.

There are so many ways you can solve your problem. One option would be to create a stateless session bean facade with a static instance variable that holds the SessionFactory instance and a static initializer in the bean class to crete the SessionFactory. Once you deploy the EJB to your server with the proper remote interface, problem gone. SessionFactory does not implement Serializable, but Session does, so your remote interface would return Session instances, not SessionFactory.

Grant


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.