tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis MONTEIRO <jean-louis.monte...@atosorigin.com>
Subject Re: Overriding persistence-unit-name
Date Tue, 12 May 2009 09:23:25 GMT

Hi,

you're definitely right.

An EJB (CatalogueManager) in an ejb-jar (project A) is deployed and bound to
JNDI.


Fred59 wrote:
> 
> <ejb-jar>
> 	<enterprise-beans>
> 		<session>
> 			<ejb-name>projectBCatalogueManager</ejb-name>
> 		
> <ejb-class>net.atos.xastory.csm.core.product.impl.CatalogueManagerImpl</ejb-class>
> 			<persistence-context-ref>
> 				<persistence-context-ref-name>
> 					net.atos.xastory.csm.core.product.impl.CatalogueManagerImpl/em
> 				</persistence-context-ref-name>
> 				<persistence-unit-name>
> 					cmi-csm-core
> 				</persistence-unit-name>
> 			</persistence-context-ref>
> 		</session>
> 	</enterprise-beans>
> </ejb-jar>
> 

Such configuration allows you to define a new EJB named
projectBCatalogueManager in project B (different ejb-jar) based on the same
class.

So you will get 2 beans:
- the original from the ejb-jar named A with one persistence context
- another one from the ejb-jar named B with the overridden persistence
context

So, depending on your needs, you can use one or the other.

Jean-Louis


-- 
View this message in context: http://www.nabble.com/Overriding-persistence-unit-name-tp23498287p23499084.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message