geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zeros <sergio.ortega.gam...@gmail.com>
Subject JPA, entities and EJB3
Date Tue, 27 May 2008 23:09:25 GMT

Good evening:

    I'm newbie with EJB3.0. I want to configure the persistence.xml to have
entities managed with JPA. I have the next configuration files:
OPENJPA-JAR.XML

<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>o2o.marketing</sys:groupId>
      <sys:artifactId>EJB</sys:artifactId>
      <sys:version>1.0.8</sys:version>
      <sys:type>jar</sys:type>
    </sys:moduleId>
    <sys:dependencies>
        <sys:dependency>
            <sys:groupId>console.dbpool</sys:groupId>
        	<sys:artifactId>marketing</sys:artifactId>
        	<sys:version>1.0</sys:version>
          	<sys:type>rar</sys:type>
  		</sys:dependency>
  </sys:dependencies>
  </sys:environment>
</openejb-jar>

And I have also persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="marketing">
    	<description>Entity Beans for User</description>
    
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
    	<jta-data-source>java:comp/env/marketing</jta-data-source>
    	<non-jta-data-source>java:comp/env/marketing</non-jta-data-source>
        <mapping-file>META-INF/orm.xml</mapping-file>
        <properties />
  </persistence-unit>
</persistence>

The error which I'm having is the next one: Unable to resolve reference
"JtaDataSourceWrapper" and Unable to resolve reference
"NonJtaDataSourceWrapper", which are basically the same error.

I think this is produced because I'm not mapping the Datasocurce to the
DBPool. Geronimo returns to me examples to do it for web, but no example to
do it for an EJB.

Please could you help me?

WATCH OUT! I'm talking about entities and EJB3.0, not entiti beans and
EJB2.0

Thanks in advance

SERGIO
-- 
View this message in context: http://www.nabble.com/JPA%2C-entities-and-EJB3-tp17502079s134p17502079.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message