Lorenzo,

1. Actually the *real* name is the "$ProxyN".
JBoss uses dynamic proxy to construct a
sort of stub for your EJB client. 
The returned "$Proxy" class implements 
your HomeInterface.

2. You HomeInterface is the *interface*.
So anyway, something should implement it.
What did you expect?


3. You may get the list of interfaces and/or
your real HomeInterface by using reflection.

Regards,
Alex,



Lorenzo Resta wrote:
> 
> Hi,
> 
> Does someone know how to get the thre "real" class names of EJB's looked
> up through a given context?
> Right now i try to look up all name in a specified context like this:
> 
>     myContext = new InitialContext();
> 
>     theNames = myContext.list("/company/applications");
> 
>     while(theNames.hasMore()){
> 
>       NameClassPair theName = (NameClassPair)theNames.next();
> 
>       String theClassName = theName.getClassName(); //<--- Here i get
> always classnames like "$Proxy1"
> 
>       Object theObjectRef   = myContext.lookup(aName+"/"+theName.getName());
> 
>       EJBHome theHome =
> (EJBHome)PortableRemoteObject.narrow(theObjectRef, EJBHome.class);
> 
>     }
> 
> So far the code works fine, but the trouble is that the class name
> stores in JNDI is always something like "$Proxy1". But i would like to
> get the real
> Homeinterface class name.
> 
> By the way : even in JNDIView the classnames appear as "$Proxy0",
> "$Proxy1" , etc.
> 
> Any ideas how to get at the "real" class names?
> 
> Thanks
> 
> Lorenzo Resta
> 
> SurfKitchen Inc.
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

-- 
__________________________________________________
Alexander Kogan  PTC   www.ptc.com
[EMAIL PROTECTED]    140 Kendrick St. Needham MA 02494

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to