geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianny Damour <>
Subject Re: Help with CMP Entity Bean
Date Sat, 18 Mar 2006 23:24:01 GMT
Olivier Voutat wrote:

> Well,
> I'm trying to create a simple application with a Cmp Entity Bean but 
> I'm missing how I should do the Database connection tags. My database 
> pool is already deployed and working. Here are my ejb-jar.xml and 
> openejb-jar.xml :
> <?xml version="1.0" encoding="UTF-8"?>
> <ejb-jar id="ejb-jar_ID" version="2.1" 
> xmlns=" 
> <>" 
> xmlns:xsi="" 
> xsi:schemaLocation=" 
> <> 
>     <display-name>ProdutoCmp</display-name>
>     <enterprise-beans>


> <?xml version="1.0" encoding="UTF-8"?>
> <openejb-jar xmlns="" 
> xmlns:nam="" xmlns:pkgen=" 
> xmlns:sec="" xmlns:sys=" 
> configId="ProdutoCmp/ProdutoCmp">
>     <cmp-connection-factory>
>         <resource-link>ProdutoCmp</resource-link>
>     </cmp-connection-factory>

If the database pool is already deployed, i.e. not deployed at the same 
time than your EJB module within an EAR, then you cannot use the 
resource-link tag. This tag allows you to point to a 
connectiondefinition-instance defined in the same EAR module than your 
EJB moduler (this is more or less like the ejb-link mechanism).

In your case, you need to use a (have a 
look to geronimo-naming-1.0.xsd for more details). I think that you want 
something like this:
        <application><the name of the EAR module defining the RAR - null 
if the RAR was deployed as a standalone module></application>
        <module><name of the RAR module></module>
        <name><name of the connectiondefinition-instance>.</name>


View raw message