Daniel Benítez wrote:
> Yes we can!
>
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
> <persistence-unit name="SenecaPU" transaction-type="RESOURCE_LOCAL">
>
> <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
>
> <!--<non-jta-data-source>jdbc/SenecaJNDI</non-jta-data-source>-->
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="toplink.jdbc.driver"
> value="org.apache.derby.jdbc.ClientDriver"/>
> <property name="toplink.logging.level" value="OFF"/>
> <property name="toplink.ddl-generation" value="create-tables"/>
> </properties>
> </persistence-unit>
> </persistence>
Why do you use RESOURCE_LOCAL and jdbc properties in the EJB? How do you get a
hold of an EM there?
>
>
> I'm not sure about what do you want of the structure of the ear file,
> directories and files?
Yes.
thanks,
-marina
>
>
> Thanks!
>
> Daniel Benítez.
>
>
>
>
>
>
>
>
>
>
>
> --------------------------------------------------
> From: "Marina Vatkina" <Marina.Vatkina_at_Sun.COM>
> Sent: Wednesday, December 03, 2008 1:12 AM
> To: <persistence_at_glassfish.dev.java.net>
> Subject: Re: Where is my persistence unit?
>
>> Can you publish your persistence.xml and the structure of your ear file?
>>
>> thanks,
>> -marina
>>
>> Daniel Benítez wrote:
>>
>>> Hi people,
>>>
>>> I have a problem with a wicked persistence unit. My Entreprise
>>> Application
>>> in Netbeans 6.1 have an EJB and a App Client. I defined a persistence
>>> unit
>>> to connect with a derby database in the EJB module. My problem is
>>> that I try
>>> to execute from my Entreprise Application it not run, but if I
>>> execute from
>>> the Application client, I have not problems with the persistence unit.
>>>
>>> Netbeans tell me that "Exception in thread "AWT-EventQueue-0"
>>> javax.persistence.PersistenceException: No Persistence provider for
>>> EntityManager named SenecaPU". (Persistence provider named SenecaPU
>>> exist!)
>>>
>>> I defined de persistence unit with transaction-type="RESOURCE_LOCAL"
>>> parameter, but if I change this parameter with "JTA" I have not way
>>> to run
>>> my program.
>>>
>>>
>>>
>>> Thank You every one.
>>>
>>> Daniel Benítez.
>>>
>>>
>>>
>>
>>