java ee - Injecting no-interface ejb in a different ear -


i have no-interface ejb deployed in ear (myear.ear)

@stateless @localbean public class myservice{ // stuff } 

the ear deployed jboss-6.0.0.final

i confirmed jndi name server jmx console:

myear/myservice/no-interface

i'm trying reference ejb ejb in war (outside ear) in same server:

@ejb(mappedname = "myear/myservice/no-interface") private myservice myservice; 

i'm referencing ear project war project in eclipse, , compilation successful.

i keep getting classnotfoundexception exception when deploying war:

java.lang.classnotfoundexception: eg.com.test.myservice

why ejb in war not seeing ejb other ear?

edit: updated follwing

remote interface

@remote public interface myserviceremote{ // stuff } 

ejb

@stateless public class myservice implements myserviceremote{ // stuff } 

ejb reference in different application

@ejb(mappedname = "myear/myservice/remote") private myserviceremote myservice; 

i verified new jndi name on server: myear/myservice/remote

but i'm still getting same exception, time interface not found:

java.lang.classnotfoundexception: eg.com.test.myserviceremote

update: needed package remote interface war, working correctly now.

that ejb need have remote interface, , access same remote ejb external war. external war has seperate class loader ear, hence not find ear classes.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -