tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: How to tell openejb to use only supplied orm over generated for CMP2.1
Date Wed, 09 Jan 2013 10:40:38 GMT
Hi,

well you probably hit a bug

here is the converter: org.apache.openejb.config.CmpJpaConversion#deploy
and currently you can't skip it

that said i think the generated file mainly helps to convert to JPA cmp2
beans rather than running the app faster

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/1/9 BKumar <bibhuti.kumar@creditpointe.com>

> Hi,
>
> According to  documentation, I  have saved the
> openejb-cmp-generated-orm.xml
> and changed it to  supply  my sequence generator.After that I placed
> openejb-cmp-generated-orm.xml inside META-INF of my entity bean and also
> having proper entry in persistenace.xml. When I  start my tomee+ server it
> loads and scan two mapping discriptor file i.e. one that I have supplied
> and
> one that is generated by the server.
>
> Here I  am observing that, some time it load openejb-cmp-generated-orm.xml
> and run properly. when it load  generated openejb-cmp-generated-orm.xm then
> it is unable to generate sequence.
>
> Message I  have observed in server log.
> Found duplicate metadata or mapping for "class openejb.com.rage.EmpBean".
>
>
>
> 1. Generated : openejb-cmp-generated-orm.xml
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
> version="1.0">
>     <entity class="openejb.com.rage.EmpBean" name="EmpBean">
>         <description>EntityBean#Emp</description>
>
>
>         <attributes>
>             <id name="id">
>                 <column name="ID"/>
>                  <generated-value strategy="IDENTITY"/>
>
>             </id>
>             <basic name="name">
>                 <column name="name1"/>
>             </basic>
>             <basic name="des">
>                 <column name="des"/>
>             </basic>
>         </attributes>
>     </entity>
> </entity-mappings>
>
> 2. Supplied : openejb-cmp-generated-orm.xml
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
> version="1.0">
>     <entity class="openejb.com.rage.EmpBean" name="EmpBean">
>         <description>EntityBean#Emp</description>
>
>
>         <attributes>
>             <id name="id">
>                 <column name="ID"/>
>                 <generated-value strategy="TABLE"
> generator="RD_SEQUENCE1"/>
>                 <table-generator name="RD_SEQUENCE1"
> table="RAGE_SEQUENCE_MASTER" pk-column-name="SEQUENCE_NAME"
>                 value-column-name="SEQUENCE_NUMBER"
> pk-column-value="RD_SEQUENCE"/>
>             </id>
>             <basic name="name">
>                 <column name="name1"/>
>             </basic>
>             <basic name="des">
>                 <column name="des"/>
>             </basic>
>         </attributes>
>     </entity>
> </entity-mappings>
>
> Thanks,
> BKumar
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/How-to-tell-openejb-to-use-only-supplied-orm-over-generated-for-CMP2-1-tp4660196.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message