java ee - jndi lookup routine? -


i've got java se aplication lookup remote bean , executes methods of object. there way lookup once , use object or have lookup every time ?

i trying make public object class when call ive got error.

public class attendanceregisterclient { public static studentbeanremote remoteobj; ... arraylist<student> listastudentow = attendanceregisterclient.remoteobj.listastudentow(); 

the error

exception in thread "awt-eventqueue-0" java.lang.illegalstateexception: no ejb receiver available handling [appname:,modulename:attendanceregisterbean,distinctname:] combination invocation context org.jboss.ejb.client.ejbclientinvocationcontext@53511634 

if call jndi lookup again works dont want time. there way pass around object ?

answer updated:

your question: there way lookup remote object once , use object in client every time, without re-doing lookup ?

answer: yes, possible through service locator pattern. article describes top bottom including examples. >> http://www.oracle.com/technetwork/java/servicelocator-137181.html


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -