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 <curti...@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.alak...@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*