Author: craigmcc
Date: Sat Jul 22 15:33:10 2006
New Revision: 424640

URL: http://svn.apache.org/viewvc?rev=424640&view=rev
Log:
Add the initial version of the POM for the sandbox itself, and the first
entry in the sandbox ... a library that creates a Java Persistence
Architecture (JPA) persistence unit, and corresponding entity classes,
for a set of relational database tables containing data similar to the
standard Struts MailReader application.

SHALE-225


Added:
    shale/sandbox/mailreader-jpa/
    shale/sandbox/mailreader-jpa/pom.xml   (with props)
    shale/sandbox/mailreader-jpa/profiles.xml   (with props)
    shale/sandbox/mailreader-jpa/src/
    shale/sandbox/mailreader-jpa/src/main/
    shale/sandbox/mailreader-jpa/src/main/java/
    shale/sandbox/mailreader-jpa/src/main/java/org/
    shale/sandbox/mailreader-jpa/src/main/java/org/apache/
    shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/
    
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Protocol.java
   (with props)
    
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Subscription.java
   (with props)
    
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/User.java   
(with props)
    
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/package.html
   (with props)
    shale/sandbox/mailreader-jpa/src/main/resources/
    shale/sandbox/mailreader-jpa/src/main/resources/META-INF/
    shale/sandbox/mailreader-jpa/src/main/resources/META-INF/persistence.xml   
(with props)
    shale/sandbox/pom.xml   (with props)

Added: shale/sandbox/mailreader-jpa/pom.xml
URL: 
http://svn.apache.org/viewvc/shale/sandbox/mailreader-jpa/pom.xml?rev=424640&view=auto
==============================================================================
--- shale/sandbox/mailreader-jpa/pom.xml (added)
+++ shale/sandbox/mailreader-jpa/pom.xml Sat Jul 22 15:33:10 2006
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id$
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>sandbox-parent</artifactId>
+    <groupId>org.apache.shale</groupId>
+    <version>1.0.3-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.shale</groupId>
+  <artifactId>mailreader-jpa</artifactId>
+  <name>MailReader JPA Entity Classes</name>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>javax.persistence</groupId>
+      <artifactId>persistence-api</artifactId>
+      <version>1.0</version>
+<!-- Uncomment if deploying to a Java EE 5 server
+      <scope>provided</scope>
+-->
+    </dependency>
+
+    <!-- Comment out if deploying to a Java EE 5 server -->
+    <dependency>
+      <groupId>oracle.toplink.essentials</groupId>
+      <artifactId>toplink-essentials-agent</artifactId>
+      <version>1.0</version>
+    </dependency>
+
+    <!-- Comment out if deploying to a Java EE 5 server with a
+         server provided data source -->
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>10.1.2.1</version>
+    </dependency>
+        
+  </dependencies>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration>
+            <source>1.5</source>
+            <target>1.5</target>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>

Propchange: shale/sandbox/mailreader-jpa/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/sandbox/mailreader-jpa/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/sandbox/mailreader-jpa/profiles.xml
URL: 
http://svn.apache.org/viewvc/shale/sandbox/mailreader-jpa/profiles.xml?rev=424640&view=auto
==============================================================================
--- shale/sandbox/mailreader-jpa/profiles.xml (added)
+++ shale/sandbox/mailreader-jpa/profiles.xml Sat Jul 22 15:33:10 2006
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><profilesXml />
\ No newline at end of file

Propchange: shale/sandbox/mailreader-jpa/profiles.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/sandbox/mailreader-jpa/profiles.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Protocol.java
URL: 
http://svn.apache.org/viewvc/shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Protocol.java?rev=424640&view=auto
==============================================================================
--- 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Protocol.java
 (added)
+++ 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Protocol.java
 Sat Jul 22 15:33:10 2006
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mailreaderjpa;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.Version;
+
+/**
+ * <p>JPA entity class for the <code>MAILREADER_PROTOCOLS</code> table.</p>
+ */
[EMAIL PROTECTED](name="mailreader_protocols")
[EMAIL PROTECTED]({
+    @NamedQuery(name="Protocol.findAll", query="SELECT p FROM 
mailreader_protocols p")
+})
+public class Protocol implements Serializable {
+
+    @Id
+    @Column(name="protocol_id")
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private Integer id;
+    
+    /** Creates a new instance of Protocol */
+    public Protocol() {
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public int hashCode() {
+        if (getId() != null) {
+            return getId().intValue();
+        } else {
+            return super.hashCode();
+        }
+    }
+
+    public boolean equals(Object obj) {
+        if (obj instanceof Protocol) {
+            return getId().equals(((Protocol) obj).getId());
+        } else {
+            return false;
+        }
+    }
+
+    public String toString() {
+        return "org.apache.mailreaderjpa.Protocol[id=" + id + "]";
+    }
+    
+    @Column(nullable=false)
+    private String description;
+    @Column(name="last_update")
+    @Version()
+    private Timestamp lastUpdate;
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Timestamp getLastUpdate() {
+        return lastUpdate;
+    }
+
+    public void setLastUpdate(Timestamp lastUpdate) {
+        this.lastUpdate = lastUpdate;
+    }
+
+}

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Protocol.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Protocol.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Subscription.java
URL: 
http://svn.apache.org/viewvc/shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Subscription.java?rev=424640&view=auto
==============================================================================
--- 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Subscription.java
 (added)
+++ 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Subscription.java
 Sat Jul 22 15:33:10 2006
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mailreaderjpa;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToOne;
+import javax.persistence.Version;
+
+/**
+ * <p>JPA entity class for the <code>MAILREADER_SUBSCRIPTIONS</code> table.</p>
+ */
[EMAIL PROTECTED](name="mailreader_subscriptions")
[EMAIL PROTECTED]({
+    @NamedQuery(name="Subscription.findAll", query="SELECT s FROM 
mailreader_subscriptions s"),
+    @NamedQuery(name="Subscription.findByUserId", query="SELECT s FROM 
mailreader_subscriptions s WHERE s.user = :userid")
+})
+public class Subscription implements Serializable {
+
+    @Id
+    @Column(name="subscription_id")
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private Integer id;
+    
+    /** Creates a new instance of Subscription */
+    public Subscription() {
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String toString() {
+        return "org.apache.mailreaderjpa.Subscription[id=" + getId() + "]";
+    }
+    
+    public int hashCode() {
+        if (getId() != null) {
+            return getId().intValue();
+        } else {
+            return super.hashCode();
+        }
+    }
+
+    public boolean equals(Object obj) {
+        if (obj instanceof Subscription) {
+            return getId().equals(((Subscription) obj).getId());
+        } else {
+            return false;
+        }
+    }
+
+    @Column(name="auto_connect")
+    private boolean autoConnect;
+    @Column(nullable=false)
+    private String host;
+    @Column(nullable=false)
+    private String password;
+    @JoinColumn(name="protocol_id")
+    @OneToOne
+    private Protocol protocol;
+    @JoinColumn(name="user_id", nullable=false)
+    @ManyToOne
+    private User user;
+    @Column(nullable=false)
+    private String username;
+    @Column(name="last_update")
+    @Version()
+    private Timestamp lastUpdate;
+
+    public boolean isAutoConnect() {
+        return autoConnect;
+    }
+
+    public void setAutoConnect(boolean autoConnect) {
+        this.autoConnect = autoConnect;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public Protocol getProtocol() {
+        return protocol;
+    }
+
+    public void setProtocol(Protocol protocol) {
+        this.protocol = protocol;
+    }
+
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public Timestamp getLastUpdate() {
+        return lastUpdate;
+    }
+
+    public void setLastUpdate(Timestamp lastUpdate) {
+        this.lastUpdate = lastUpdate;
+    }
+
+}

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Subscription.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/Subscription.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/User.java
URL: 
http://svn.apache.org/viewvc/shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/User.java?rev=424640&view=auto
==============================================================================
--- 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/User.java 
(added)
+++ 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/User.java 
Sat Jul 22 15:33:10 2006
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mailreaderjpa;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.List;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToMany;
+import javax.persistence.Version;
+
+/**
+ * <p>JPA entity class for the <code>MAILREADER_USERS</code> table.</p>
+ */
[EMAIL PROTECTED](name="mailreader_users")
[EMAIL PROTECTED]({
+    @NamedQuery(name="User.findAll", query="SELECT u FROM mailreader_users u"),
+    @NamedQuery(name="User.findByUsername", query="SELECT u FROM 
mailreader_users u WHERE u.username = :username")
+})
+public class User implements Serializable {
+
+    @Id
+    @Column(name="user_id")
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private Integer id;
+    
+    /** Creates a new instance of User */
+    public User() {
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String toString() {
+        return "org.apache.mailreaderjpa.User[id=" + id + "]";
+    }
+    
+    public int hashCode() {
+        if (getId() != null) {
+            return getId().intValue();
+        } else {
+            return super.hashCode();
+        }
+    }
+
+    public boolean equals(Object obj) {
+        if (obj instanceof User) {
+            return getId().equals(((User) obj).getId());
+        } else {
+            return false;
+        }
+    }
+
+    @Column(name="from_address")
+    private String fromAddress;
+    @Column(name="full_name")
+    private String fullName;
+    @Column(nullable=false)
+    private String password;
+    @Column(name="reply_to_address")
+    private String replyToAddress;
+    @OneToMany(mappedBy="user",cascade=CascadeType.ALL)
+    private List<Subscription> subscriptions;
+    @Column(nullable=false, unique=true)
+    private String username;
+    @Column(name="last_update")
+    @Version()
+    private Timestamp lastUpdate;
+
+    public String getFromAddress() {
+        return fromAddress;
+    }
+
+    public void setFromAddress(String fromAddress) {
+        this.fromAddress = fromAddress;
+    }
+
+    public String getFullName() {
+        return fullName;
+    }
+
+    public void setFullName(String fullName) {
+        this.fullName = fullName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getReplyToAddress() {
+        return replyToAddress;
+    }
+
+    public void setReplyToAddress(String replyToAddress) {
+        this.replyToAddress = replyToAddress;
+    }
+
+    public List<Subscription> getSubscriptions() {
+        return subscriptions;
+    }
+
+    public void setSubscriptions(List<Subscription> subscriptions) {
+        this.subscriptions = subscriptions;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public Timestamp getLastUpdate() {
+        return lastUpdate;
+    }
+
+    public void setLastUpdate(Timestamp lastUpdate) {
+        this.lastUpdate = lastUpdate;
+    }
+
+    public void addSubscription(Subscription subscription) {
+        List<Subscription> subscriptions = getSubscriptions();
+        if (!subscriptions.contains(subscription)) {
+            subscription.setUser(this);
+            subscriptions.add(subscription);
+        }
+    }
+
+    public void removeSubscription(Subscription subscription) {
+        List<Subscription> subscriptions = getSubscriptions();
+        if (subscriptions.contains(subscription)) {
+            subscriptions.remove(subscription);
+            subscription.setUser(null);
+        }
+    }
+
+
+}

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/User.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/User.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/package.html
URL: 
http://svn.apache.org/viewvc/shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/package.html?rev=424640&view=auto
==============================================================================
--- 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/package.html
 (added)
+++ 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/package.html
 Sat Jul 22 15:33:10 2006
@@ -0,0 +1,57 @@
+<!--
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<!-- $Id$ -->
+
+<body>
+
+<p>MailReader Database Java Persistence Architecture (JPA) Entity Classes.</p>
+
+<p>This package contains <em>entity</em> classes that correspond to relational
+database tables for a persistent version of the "user" and "subscription" data
+from the original Struts MailReader example application, where the "database"
+was represented as an XML file.  See
+<a href="http://jcp.org/en/jsr/detail?id=220"; target="_blank">
+the specification</a> for more information about the Java Persistence
+Architecture.</p>
+
+<p>This library comprises a <em>persistence unit</em> named
+<code>MailReaderJpa</code>, whose characteristics are described in a
+<code>META-INF/persistence.xml</code> file included in the JAR.  As
+delivered, the persistence unit presumes deployment into a Java EE 5
+based application server, using a configured JDBC <code>DataSource</code>
+named <strong><code>jdbc/mailreader</code></strong>.  The details of how
+this maps to an actual database are defined in the configuration files
+(or through the administration console) for your application server.
+It is also possible to define a persistence unit that uses a standalone
+JPA implementation, and perhaps even an embedded database.  See the
+commented out example in <code>persistence.xml</code> for a flavor of
+how this might look.</p>
+
+<p>Java Persistence Architecture technology can be used in a number of 
different
+ways.  For ease of deployment of example applications using this library, this
+persistence unit is configured to create the appropriate tables if necessary,
+with the characteristics of the tables and columns being configured from
+annotations in the (hand created, with tool assistance) entity classes.  A
+common alternative scenario will be where you have existing database schemas,
+and use a tool like
+<a href="http://www.netbeans.org/community/releases/55/index.html"; 
target="_blank">
+NetBeans 5.5</a> to automatically create entity classes from existing tables.
+Both techniques represent best practice, as does the concept of keeping a 
persistence
+unit (and its corresponding entity classes) packaged as a separate Java class
+library that can be reused across multiple projects.</p>
+
+</body>

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/sandbox/mailreader-jpa/src/main/java/org/apache/mailreaderjpa/package.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/sandbox/mailreader-jpa/src/main/resources/META-INF/persistence.xml
URL: 
http://svn.apache.org/viewvc/shale/sandbox/mailreader-jpa/src/main/resources/META-INF/persistence.xml?rev=424640&view=auto
==============================================================================
--- shale/sandbox/mailreader-jpa/src/main/resources/META-INF/persistence.xml 
(added)
+++ shale/sandbox/mailreader-jpa/src/main/resources/META-INF/persistence.xml 
Sat Jul 22 15:33:10 2006
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id$
+ */
+-->
+
+<!-- Persistence unit for a predeployed data source on a Java EE 5 server -->
+<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence";>
+  <persistence-unit name="MailReaderJpa" transaction-type="JTA">
+    
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
+    <jta-data-source>jdbc/mailreader</jta-data-source>
+    <properties>
+      <property name="toplink.ddl-generation" value="create-tables"/>
+    </properties>
+  </persistence-unit>
+</persistence>
+
+<!-- Persistence unit for standalone JPA implementation
+<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence";>
+  <persistence-unit name="MailReaderJpa" transaction-type="RESOURCE_LOCAL">
+    
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
+    <class>org.apache.mailreaderjpa.Protocol</class>
+    <class>org.apache.mailreaderjpa.Subscription</class>
+    <class>org.apache.mailreaderjpa.User</class>
+    <properties>
+      <property name="toplink.jdbc.url" 
value="jdbc:derby://localhost:1527/mailreader"/>
+      <property name="toplink.jdbc.user" value="app"/>
+      <property name="toplink.jdbc.driver" 
value="org.apache.derby.jdbc.ClientDriver"/>
+      <property name="toplink.jdbc.password" value="app"/>
+      <property name="toplink.ddl-generation" value="create-tables"/>
+    </properties>
+  </persistence-unit>
+</persistence>
+ -->
+ 
\ No newline at end of file

Propchange: 
shale/sandbox/mailreader-jpa/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/sandbox/mailreader-jpa/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/sandbox/pom.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/pom.xml?rev=424640&view=auto
==============================================================================
--- shale/sandbox/pom.xml (added)
+++ shale/sandbox/pom.xml Sat Jul 22 15:33:10 2006
@@ -0,0 +1,118 @@
+<!--
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id$
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.shale</groupId>
+        <artifactId>shale-master</artifactId>
+        <version>1-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.shale</groupId>
+    <artifactId>sandbox-parent</artifactId>
+    <version>1.0.3-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>Apache Shale Sandbox Projects</name>
+    <url>http://shale.apache.org</url>
+
+    <scm>
+        
<connection>scm:svn:http://svn.apache.org/repos/asf/shale/trunk/sandbox</connection>
+        
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/shale/trunk/sandbox</developerConnection>
+        <url>http://svn.apache.org/viewvc/shale/trunk/sandbox</url>
+    </scm>
+
+    <distributionManagement>
+        <site>
+            <id>apache-site</id>
+            
<!--url>scp://people.apache.org/www/shale.apache.org/shale-apps</url-->
+            <url>scp://people.apache.org/www/shale.apache.org/sandbox</url>
+        </site>
+    </distributionManagement>
+
+    <dependencies>
+        <!-- Document "provided" dependencies to avoid cluttering WAR files -->
+    </dependencies>
+
+    <!-- TODO:  Move the 'itest' profile and dependencies to this pom when 
MNG-2221 is fixed. -->
+
+    <profiles>
+        <profile>
+            <activation>
+                <jdk>1.5</jdk>
+            </activation>
+            <modules>
+                <module>mailreader-jpa</module>
+            </modules>
+        </profile>
+    </profiles>
+
+    <modules>
+<!--
+        <module>shale-blank</module> 
+        <module>shale-mailreader</module>
+        <module>shale-usecases</module>
+        <module>shale-clay-usecases</module>
+-->
+    </modules>
+
+    <repositories>
+        <repository>
+            <id>apache.snapshots</id>
+            <name>Apache Maven Repository (Snapshots and Test Builds)</name>
+            <url>http://people.apache.org/maven-snapshot-repository</url>
+            <releases><enabled>true</enabled></releases>
+            <snapshots><enabled>true</enabled></snapshots>
+        </repository>
+        <repository>
+            <id>java.net</id>
+            <name>java.net Maven 1 Repository</name>
+            <url>https://maven-repository.dev.java.net/nonav/repository</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
+
+    <build>
+        <finalName>${artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.cargo</groupId>
+                <artifactId>cargo-maven2-plugin</artifactId>
+                <configuration>
+                    <container>
+                        <containerId>tomcat5x</containerId>
+                        <home>${cargo.tomcat5x.home}</home>
+                        <log>${project.build.directory}/tomcat5x.log</log>
+                        
<output>${project.build.directory}/tomcat5x.out</output>
+                    </container>
+                    <configuration>
+                        <home>${project.build.directory}/tomcat5x</home>
+                       <properties>
+                               <cargo.jvmargs> -Xdebug 
-Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n </cargo.jvmargs>
+                       </properties>
+                    </configuration>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Propchange: shale/sandbox/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/sandbox/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL


Reply via email to