RSS

Change Session Bean’s JNDI Name

08 Mar

Session Bean:

@Stateless

@Remote ({UserRemote.class})

@RemoteBinding(jndiBinding=“user/UserR”)

@Local({UserLocal.class})

@LocalBinding(jndiBinding=“user/UserL”)

public class Userbean implements UserRemote, UserLocal{

            //Business methods implement

}


JSP Client codes
:

Context ctx = new InitialContext();

UserRemote ur = (UserRemote) ctx.lookup(“user/UserR”);

UserLocal ul = (UserLocal) ctx.lookup(“user/UserL”);

Note: JBoss AS7.1 doesn’t support Customize JNDI of Session Bean.

Advertisements
 
Leave a comment

Posted by on 03/08/2012 in EJB

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: