[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [eclipselink-users] How to create EclipseLink Sessions, ORM.xml files in J2SE environment
|
Kris,
If you
are planning on using our Native API (Session, UnitOfWork, ReadAllQuery, ...)
instead of JPA (EntityManager, EntityManagerFactory, Query, ...) you do not need
to use any JPA XML files (i.e. persistence.xml). You can simply do your mappings
using the Workbench and use our native API as it sounds like you have experience
there.
As
indicated you can use JPA and access our native implementation when required.
Take a look at the JPAHelper class for some methods to un-wrap
sessions/UnitOfWork/Query objects when you need them.
Doug
Hi Tim
Thanks for taking the time for replying to my query. I still did
not get from the links you pointed me out of how to create sessions. I
see you are using entitymanagerfactory and entitymanager. I dont see
creatin any sessions and unit of works in these examples.
Can you help me with that?
Thanks
Kris
f u cn rd ths, u cn gt a gd jb n cmptr
prgrmmng
--- On Sat, 1/17/09, Tim Hollosy
<hollosyt@xxxxxxxxx> wrote:
From:
Tim Hollosy <hollosyt@xxxxxxxxx> Subject: Re:
[eclipselink-users] How to create EclipseLink Sessions, ORM.xml files
in J2SE environment To: "EclipseLink User Discussions"
<eclipselink-users@xxxxxxxxxxx> Date: Saturday, January 17,
2009, 6:54 PM
Don't do it all alone!here:Sat, Jan 17, 2009 at 5:59 PM, krisUSA123 <krisusa123@xxxxxxxxx> wrote:>> Hello> I am a newbie to EclipseLink and so far was able to write an> file where I can do CRUD operations against my DB.>> How do I create a Session in a pure J2SE environment so that I can use> Of Work" concepts working. Do I need a Database Session created ora> regular ServerSession. Also, any links, examples that you can throw at me> would be very helpful.>> Any examples of ORM.xml files is also very helpful.>> Here is what my persistence file looks like:>> <?xml version="1.0" encoding="UTF-8"?>> <persistence version="1.0"> 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="Prototype">> <provider>> org.eclipse.persistence.jpa.PersistenceProvider> </provider>> <class>TestEtl</class>> <properties>> <!-- Logging defaults set here -->> <propertyvalue="FINE"/>> <propertyvalue="false"/>> <propertyvalue="false"/>> <propertyvalue="false"/>>> <!-- Oracle Connections -->>> <property name="eclipselink.jdbc.driver"> value="oracle.jdbc.driver.OracleDriver" /><property> name="eclipselink.logging.session" value="false"/>> <property name="eclipselink.jdbc.url"> value="jdbc:oracle:thin:@//xx"/>> <property name="eclipselink.jdbc.password">> <property name="eclipselink.jdbc.user">> <property> value="1"/>> <propertyvalue="1"/>> <propertyvalue="Oracle"/>> <propertyvalue="JDBC" />> </properties>> </persistence-unit>> </persistence>>> As Always,> Thanks in Advance!>> Kris>>> --> View this message in context:> Sent from the EclipseLink - Users mailing list archive at Nabble.com.>> _______________________________________________> eclipselink-users mailing list> eclipselink-users@xxxxxxxxxxx> https://dev.eclipse.org/mailman/listinfo/eclipselink-users>mailing list |