Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

change SLSB JNDI name in EJB3  RSS feed

 
Manjesh Reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Environment:
JBoss 4.2.0GA App server
JDK 1.5

I have a SLSB(ex: TestManagerBean) as shown below

@Stateless
public class TestManagerBean implements
TestManagerBeanLocal, TestManagerBeanRemote {
....
}

now when I tried deploying it as a jar file, the JNDI names were
Remote interface : TestManagerBean/remote
Local interface: TestManagerBean/local

I found online that if I deploy the same SLSB as a part of an EAR file(ex: TestProject.ear), the JNDI names will be something like
Remote interface : TestProject/TestManagerBean/remote
Local interface: TestProject/TestManagerBean/local

Is there a way to override these JNDI names and just say "ejbs/TestManagerBean/remote" and "ejb/TestManagerBean/local"?

i tried
@Stateless(mappedName="ejb/ManjeshTestRecordManagerBean")
but that didn't change the JNDI name.

any suggestions?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manjesh,

Welcome to JavaRanch

Try this:



More details here
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!