• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven with Ejb

 
Kousik Majumder
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an application where ear contains both ejbs and a .war file.
Now suppose if I have 10 entity beans and 10 session beans in my application then according to my understanding I think my ejb module should contain 20 submodule of beans.

Am I right about my understanding? Please tell.


an example draft is shown below:-

myproject/ear
myproject/war
myproject/ejbs
myproject/ejbs/ejbModule1
myproject/ejbs/ejbModule2
....
....
myproject/ejbs/ejbModule20


Another option that may happen is also given below. Please tell me what is the best practice from these two?

myproject/ear
myproject/war
myproject/ejbModule1
myproject/ejbModule2
....
....
myproject/ejbModule20

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First go and read chapter 4 of Better Builds With Maven. That chapter covers this topic rather nicely.

Also, you do not need to place each EJB in its own project. You should group EJBs in projects in a way that makes sense from a component point of view. Also, you would not create multiple subprojects under an ejb subproject, but rather have multiple ejb subprojects. Example:

base
base/someejbs
base/otherejbs
base/war
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic