Hi,
not sure about the return values of list() but you can do:
                Object obj = new InitialContext().lookup(BeanName);
                EJBHome home =
(EJBHome)javax.rmi.PortableRemoteObject.narrow(obj, EJBHome.class);
                log.debug("HomeInterface: " +
home.getEJBMetaData().getHomeInterfaceClass());
Burkhard

----- Original Message -----
From: "Lorenzo Resta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 4:49 PM
Subject: [JBoss-user] Classnames in JNDI


> 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


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

Reply via email to