openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour Al Akeel <mansour.alak...@gmail.com>
Subject Re: exclude-unlisted-classes ignored
Date Tue, 30 Sep 2014 01:14:20 GMT
Rich,

Thank you for replying. The last line explains it "Not applicable to
Java SE persistence units."




On Mon, Sep 29, 2014 at 9:15 AM, Rick Curtis <curtisr7@gmail.com> wrote:
> It sounds like this is working as expected. Excerpt from the spec :
>
> <xsd:element name="exclude-unlisted-classes" type="xsd:boolean"
> default="true" minOccurs="0">
> <xsd:annotation>
> <xsd:documentation>
> When set to true then only listed classes and jars will
> be scanned for persistent classes, otherwise the
> enclosing jar or directory will also be scanned.
> Not applicable to Java SE persistence units.
> </xsd:documentation>
> </xsd:annotation>
> </xsd:element>
>
> On Fri, Sep 26, 2014 at 11:08 PM, Mansour Al Akeel <
> mansour.alakeel@gmail.com> wrote:
>
>> When creating EntityManagerFactory using OpenEJB,
>> exclude-unlisted-classes works as expected. However, when creating it
>> directly as in:
>>
>>
>> props.setProperty("javax.persistence.jdbc.driver", this.driver);
>>     props.setProperty("javax.persistence.jdbc.url", this.url);
>>     props.setProperty("javax.persistence.jdbc.user", this.username);
>>     props.setProperty("javax.persistence.jdbc.password", this.password);
>>
>>     props.setProperty("javax.persistence.transactionType",
>> PersistenceUnitTransactionType.RESOURCE_LOCAL.name());
>>
>>     EntityManagerFactory emf =
>> Persistence.createEntityManagerFactory(null, props);
>>
>>
>> The classes are not scanned. The only classes that are loaded and
>> created tables into the DB are those listed in the persistence.xml
>>
>> I noticed that openejb and openjpa has their own implementation of
>> PersistenceUnitInfoImpl.
>>
>> I just need to confirm if this is a bug, or I am missing something.
>>
>>
>> Thank you.
>>
>
>
>
> --
> *Rick Curtis*

Mime
View raw message