On Aug 4, 2010, at 12:18 AM, Mark Struberg wrote: > But maybe I miss something: what do you mean with different meta-data in this > context?
For example, something like this: <ejb-jar> <enterprise-beans> <session> <ejb-name>BeanOne</ejb-name> <ejb-class>org.foo.MyEjbClass</ejb-class> <session-type>Stateful</session-type> <!-- other metadata --> </session> <session> <ejb-name>BeanTwo</ejb-name> <ejb-class>org.foo.MyEjbClass</ejb-class> <session-type>Stateful</session-type> <!-- other metadata --> </session> </enterprise-beans> </ejb-jar> The two beans share the same bean class, but could be hooked up to different datasources, persistence units, have different env entries or different timer schedules or interceptors, etc. By ejb terms these are two different ejbs. Currently this fails because the id indirectly enforces that the bean class be unique because the NewBean id is generated only using class information. If maybe it could append to the BaseEjbBean.getId() value that might work -- that would result in two entries for the same class which might not make sense in this context. Might be better to improve EjbUtility and downstream to register it once and not fail a deployment if the same class shows up again in another BaseEjbBean. Open to thoughts on the right change. -David