[
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
|
Don't do it all alone!
Look here: http://www.weheartcode.com/2008/08/27/eclipselink-in-j2se-rcp-applications/
and
http://wiki.eclipse.org/EclipseLink/Examples/OSGi
./tch
On 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 persistence.xml
> 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 "Unit
> Of Work" concepts working. Do I need a Database Session created or just a
> 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="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="Prototype" transaction-type="RESOURCE_LOCAL">
> <provider>
> org.eclipse.persistence.jpa.PersistenceProvider
> </provider>
> <class>TestEtl</class>
> <properties>
> <!-- Logging defaults set here -->
> <property name="eclipselink.logging.level" value="FINE"/>
> <property name="eclipselink.logging.thread" value="false"/>
> <property name="eclipselink.logging.timestamp" value="false"/>
> <property name="eclipselink.logging.exceptions" value="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" value="xx"/>
> <property name="eclipselink.jdbc.user" value="xx"/>
> <property name="eclipselink.jdbc.read-connections.min"
> value="1"/>
> <property name="eclipselink.jdbc.write-connections.min" value="1"/>
> <property name="eclipselink.target-database" value="Oracle"/>
> <property name="eclipselink.jdbc.batch-writing" value="JDBC" />
> </properties>
> </persistence-unit>
> </persistence>
>
> As Always,
> Thanks in Advance!
>
> Kris
>
>
> --
> View this message in context: http://www.nabble.com/How-to-create-EclipseLink-Sessions%2C-ORM.xml-files-in-J2SE-environment-tp21490017p21490017.html
> 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
>