[jboss-user] [EJB 3.0] - EJB3 interfaces questions

pablojavierpy do-not-reply at jboss.com
Sat Jan 20 13:06:32 EST 2007


Hi all,

I have a Session Bean that looks like this:

public @Stateless class ReverseBean implements Reverse {
  |     
  |     public String reverse(String s)
  |     {
  |         String ret;
  |         // code to reverse the string "s" here
  |         return ret;
  |     }
  | 
  | }
  | 

And then, I have its corresponding interface:

@Remote
  | @Local
  | public interface Reverse {
  |     public String reverse(String s);
  | }
  | 

I have five small questions:
1) Is it OK to use only ONE class as remote AND local interface?
2) What's the default JNDI name assigned to the Session Bean? That is, how am I suppose to do the lookup for the Session Bean in the Initial Context?
3) Can I use @EJB injection in Servlets or injections are only available to other EJBs?
4) Where should I specify the "client-jar" if I am using EJB3? Do I even need a "client-jar"?
5) Where can I find more documentation about these three previous questions?

I am using JBoss 4.0.5.GA, installed with the installer, and the original EJB3 RC9 that comes with it.


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

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



More information about the jboss-user mailing list