views:

23

answers:

1

I'm working with IBM Rational Application Developer for WebSphere; it is based on Eclipse, though I'm not sure of its differences from Eclipse's Java EE features.

I want to have two Enterprise JavaBeans. Do I create two separate EJB projects, one per JavaBean, or do I put them as different classes in one project?

What are the considerations when deciding between these, assuming that either is technically possible? What are the reasons to separate them or put them together in one project?

+1  A: 

I want to have two Enterprise JavaBeans. Do I create two separate EJB projects, one per JavaBean, or do I put them as different classes in one project?

You can have several EJBs per EJB module (thanks god).

What are the considerations when deciding between these, assuming that either is technically possible?

I would say packaging/deployment considerations. If for whatever reason you want to be able to assemble and deploy only one of these EJB in an Enterprise App, then provide separate modules.

The rule of thumb is to regroup things logically into a same deployable unit. Split a logical group into finer grained modules only if special deployment needs arise (rare).

See also

Pascal Thivent