Here is the JNDI tree view:
+- lhserviceear (class: org.jnp.interfaces.NamingContext)
| +- TestService (class: org.jnp.interfaces.NamingContext)
| | +- remote-com.realestate.prefund.service.ejb.RemoteTestservice (class: Proxy for: com.realestate.prefund.service.ejb.RemoteTestservice)
| | +- remote (class: Proxy for: com.realestate.prefund.service.ejb.RemoteTestservice)
Therefore, if I do a JNDI lookup as:
context.lookup("lhserviceear/TestService/remote");
It returns a proxy instead of the acutal remote bean interface, which I need it to do remote method invocation.
Any suggestions will be apprecitated!
Rookie mistake.
Remove all jboss jars in the classptah and include jboss client jars, problem solved!