[jboss-user] [Beginners Corner] - Re: application clients in JBOSS 4.2.2

sajhak do-not-reply at jboss.com
Fri Mar 7 14:00:26 EST 2008


Im refering the e-version of "begining EJB 3 application development - from 

novice to professional " - Apress publishers' and also , SUN's j2EE5 official 

tutorial.If u know abt any other recommended learning materials pls let me 

know..

so in those materials i have found that @Local can be used when both the client 

application and the EJB are in the same JVM.. since i deplyoed my EJB and the 

client application  as well to the JBOSS server , then does not those 2(EJB and 

client app) are in the same JVM.? ( the JVM of the JBOSS server instance ) if so 

, then both these components are running in the same JVM so that it must be 

possible to use the @Local interface..

to another thread that i posted in this forum under EJB 3.0 category , i got 

replies saying that JBOSS 4.2.x is not fully compliant with EJB 3.0 and j2EE 5 

specs.SO i feel that i cant achive the tasks with out using JNDI lookups( if app 

server is JBOSS )...
i.e , use the following code segment,



             @EJB 
             private static ObjectType obj;  

             InitialContext ic = new InitialContext ();
             obj = (ObjectType) ic.lookup(ObjectType.class.getName());




i can t  depend only on @EJB annotations.. 

is that right ?? , because the example in the book havent use any JNDI lookup s 

and it works fine with GlassFish - not with JBOSS.

Thanks n Rgds
Sajith

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134954#4134954

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134954



More information about the jboss-user mailing list