[jboss-user] [EJB 3.0] - Re: ClassCastException in Stateful Session-Bean
te-bachi
do-not-reply at jboss.com
Wed Jan 17 05:51:30 EST 2007
Hmm... interresting!
| public class Client {
| public static void main(String[] args) throws Exception {
|
| [...]
| Reference ref = (Reference) ctx.lookup("MyApplication/ShoppingCartBean/remote");
| System.out.println("ClassName: " + ref.getClassName());
| System.out.println("FactoryClassLocation: " + ref.getFactoryClassLocation());
| System.out.println("FactoryClassName: " + ref.getFactoryClassName());
|
| Enumeration<RefAddr> refaddrs = ref.getAll();
| RefAddr refAddr = null;
| while (refaddrs.hasMoreElements()) {
| refAddr = refaddrs.nextElement();
| System.out.println("Content: " + refAddr.getContent());
| System.out.println("ContentClassName: " + refAddr.getContent().getClass().getName());
| System.out.println("Type: " + refAddr.getType());
| }
| [...]
|
| }
| }
|
Shell:
| ClassName: java.lang.Object
| FactoryClassLocation: null
| FactoryClassName: org.jboss.ejb3.JndiProxyFactory
| Content: MyApplication/ShoppingCartBean/remoteStatefulProxyFactory
| ContentClassName: java.lang.String
| Type: FACTORY
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002696#4002696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002696
More information about the jboss-user
mailing list