-->
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.  [ 1 post ] 
Author Message
 Post subject: look-up in the "Java persistence with Hibernate"
PostPosted: Wed Feb 02, 2011 9:04 pm 
Newbie

Joined: Wed Feb 02, 2011 8:48 pm
Posts: 1
Hallo !

In the book "java persistence..." there is an example of integration test by means of the class EJB3IntegrationTest. This class has a method:
@SuppressWarnings({"unchecked"})
protected <T> T lookupLocalBean(Class<T> beanInterface, String beanImpl) {
try {
System.out.println("look up: "+ beanImpl + "/local");
return (T)jndi.lookup(beanImpl + "/local");
} catch (NamingException ex) {
throw new RuntimeException(ex);
}
}

In the case of DAOs this method returns UserDAOBean and ItemDAOBean instances
But I don't understand where the string beanImpl + "/local" is looked up! Properties files do not contain this string. The constructor of InitialContet has no parameters.
So, who can help to solve the riddle????


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

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.