geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brianm709 <bmmer...@dstsystems.com>
Subject Re: Accessing SQL Server datasource from EJB
Date Wed, 19 Dec 2007 20:36:30 GMT

I am using geronimo-tomcat6-jee5-2.0.2.
I was able to get it to work by explicitly setting the database properties
in my persistence.xml.
This will work for me for now, but I would prefer to use a datasource.

<?xml version="1.0" encoding="UTF-8"?>
<persistence   xmlns="http://java.sun.com/xml/ns/persistence"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0"
            xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
     
   <persistence-unit name="myawddbPU">
      <description>Phone Book</description>
      <class>org.apache.geronimo.samples.myphonebookpak.PhoneBook</class>
      <properties>
         <property name="openjpa.ConnectionURL"
value="jdbc:sqlserver://10.193.204.139:1433;DatabaseName=AWDP_32" />
         <property name="openjpa.ConnectionDriverName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver " />
         <property name="openjpa.ConnectionUserName" value="XXXXX" />
         <property name="openjpa.ConnectionPassword" value="XXXXXXXX" />
         <property name="openjpa.jdbc.SynchronizeMappings" value="false" />
      </properties>
   </persistence-unit> 

</persistence>

Thanks
-- 
View this message in context: http://www.nabble.com/Accessing-SQL-Server-datasource-from-EJB-tp14422136s134p14424671.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message