geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianny Damour <gianny.dam...@optusnet.com.au>
Subject Re: Deployment fail at persistent EJB
Date Tue, 12 Apr 2005 23:27:08 GMT
Katia,

The last version of Geronimo, built from source, supports CMP.

Also, could you please provide the error message that you get during the 
deployment process?

I comment your openejb-jar.xml deployment descriptor further down.

Thanks,
Gianny

On 12/04/2005 8:20 PM, Katia Aresti Gonzalez wrote:

> Hello again David!!!!
>
> The problems still go on xD. The openejb-jar.xml is wrong, and I cant 
> find any reference of an xml file to look at and compare. I know im 
> doing somethig really bad :-).
>
> Here is the openejb-jar.xml of the ejb-jar.xml. Can you help me again 
> please? thank you!!!!!
>
> Katia
>
>
> <?xml version="1.0"?>
>
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
> configId="GeronimoTestEJB"
> parentId="org/apache/geronimo/Server">
>
> <cmp-connection-factory>
>         <application>null</application>
>         <module>org/apache/geronimo/DefaultDatabase</module>
>         <name>DefaultDatasource</name>
> </cmp-connection-factory>
>
OK.

> <enterprise-beans>
> <entity>
>    <ejb-name>CabinEJB</ejb-name>
>    <jndi-name>CabinEJB</jndi-name>
>
You do not need to specify a jndi-name. This construct is only used to 
specify a global JNDI name, which you do not need in your case.

You need to specifiy a mapping table for this CMP. This is something like:
             <table-name>MyTableName</table-name>

Furthermore, you also need to specify a mapping for each of the 
persistent fields identified in your ejb-jar.xml DD. This is something like:
            <cmp-field-mapping>
                <cmp-field-name>id</cmp-field-name>
                <table-column>col_id</table-column>
            </cmp-field-mapping>

>    <resource-ref>
>    <ref-name>jdbc/titanDB</ref-name>
>   
>    </resource-ref>
>
This is now enough information. You need to map a resource reference to 
this resource name. This is something like:
                <application>null</application>
                <module>org/apache/geronimo/DefaultDatabase</module>
                <name>DefaultDatasource</name>
Such a configuration references the default datasource of Geronimo, 
which is by the way the datasource used under the cover by the CMP 
engine to interact with the database.

Please have a look to this file: 
modules/naming-builder/src/schema/geronimo-naming.xsd and especially to 
the resource-refType complex type to understand how mapping works.

> </entity> 
>
> <entity>
>    <ejb-name>ShipEJB</ejb-name>
>    <jndi-name>ShipEJB</jndi-name>
>
Same as above.

>    <resource-ref>
>    <ref-name>jdbc/titanDB</ref-name>
>
Same as above.

>   
>    </resource-ref>
> </entity>
>
> <session>
>    <ejb-name>TravelAgentEJB</ejb-name>
>    <jndi-name>TravelAgentEJB</jndi-name>
>   </session>
> </enterprise-beans>
>    
> </openejb-jar>
>

Mime
View raw message