This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Incomplete Deployment

 
Abhijith Prabhakar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to run the example codes of Oreilly EJB 3.0 book. When I deploy my ejb3mockproject.jar in JBOSS, it gives this message.



Persistence.xml:



Can anyone please tell me what I need to do to solve this?
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jta-data-source>java: /DefaultDS</jta-data-source>


There's a space between java: and the /. Remove that space and start JBoss. This entry should look like:

 
Abhijith Prabhakar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jai, that solved the deployment issue.

But after been deployed also it was giving NotBoundException for TavelAgentRemote. It started working when I added

@org.jboss.annotation.ejb.RemoteBinding(jndiBinding = "TravelAgentRemote")

Any specific reason behind this? I am curious as Oreilly book doesn't state any such annotation to be added
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Abhijith Prabhakar:
Any specific reason behind this? I am curious as Oreilly book doesn't state any such annotation to be added


By default, if you are deploying the bean in an ear file, then JBoss binds the beans to a jndi-name which is like "earName/BeanImplementationClassName/remote" (for local it is earName/BeanImplementationClassName/local). Ex: myApp/TestBean/remote. If you are deploying the bean in a jar file then the default jndi-name is BeanImplementationClassName/remote (and BeanImplementationClassName/local for local interface). Ex: TestBean/remote.

You can use these default jndi-names to do the lookup or else specify your own jndi-names for the beans. You followed the latter approach by using the @RemoteBinding annotation
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic