Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » remote interface lookup issue(StatefulProxyFactory)
remote interface lookup issue(StatefulProxyFactory) [message #444615] Fri, 17 February 2006 20:45
Robert is currently offline RobertFriend
Messages: 45
Registered: July 2009
Member
Hi everyone,
I have an RCP application that is trying to connect to a EJB3 backend.
Now i have no trouble performing the context lookup and getting an
object returned however, the object that is returned is not able to be
cast to my remote interface object.
Code:
ClassLoader orig = Thread.currentThread().getContextClassLoader();
Context ctx= null;
try{
Thread.currentThread().setContextClassLoader(RCPappPlugin.cl ass.getClassLoader());
ClassLoader curr =Thread.currentThread().getContextClassLoader();
ctx = new InitialContext();
Object referenceObject = ctx.lookup(MyInterface.class.getName());
MyInterface mi = (MyInterface)referenceObject;

....
This throws a classCastException on the last line.

When i inspect the returned object it says that its contents are
package.MyInterfaceStatefulProxyFactory. which can not be cast to
MyInterface.

When i run this in a command line application things work fine and the
object returned is a: package.MyInterfaceBean

please help as im not sure what im missing.

Thanks
Robert.
Previous Topic:Accessing Workspace Files
Next Topic:How to properly test a RCP UI?
Goto Forum:
  


Current Time: Mon Nov 04 00:53:57 GMT 2024

Powered by FUDForum. Page generated in 0.06173 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top