You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2010/02/21 22:47:26 UTC

svn commit: r912414 - in /openejb/branches/misc: jpa-customid/ jpa-customid/src/ jpa-customid/src/main/ jpa-customid/src/main/java/ jpa-customid/src/main/java/org/ jpa-customid/src/main/java/org/superbiz/ jpa-customid/src/main/java/org/superbiz/customi...

Author: dblevins
Date: Sun Feb 21 21:47:25 2010
New Revision: 912414

URL: http://svn.apache.org/viewvc?rev=912414&view=rev
Log:
Some examples that aren't too interesting.

Added:
    openejb/branches/misc/jpa-customid/
    openejb/branches/misc/jpa-customid/pom.xml   (with props)
    openejb/branches/misc/jpa-customid/src/
    openejb/branches/misc/jpa-customid/src/main/
    openejb/branches/misc/jpa-customid/src/main/java/
    openejb/branches/misc/jpa-customid/src/main/java/org/
    openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/
    openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/
    openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/Invoice.java   (with props)
    openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/InvoiceKey.java   (with props)
    openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/LineItem.java   (with props)
    openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestBean.java   (with props)
    openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestLocal.java   (with props)
    openejb/branches/misc/jpa-customid/src/main/resources/
    openejb/branches/misc/jpa-customid/src/main/resources/META-INF/
    openejb/branches/misc/jpa-customid/src/main/resources/META-INF/ejb-jar.xml   (with props)
    openejb/branches/misc/jpa-customid/src/main/resources/META-INF/orm.xml   (with props)
    openejb/branches/misc/jpa-customid/src/main/resources/META-INF/persistence.xml   (with props)
    openejb/branches/misc/jpa-customid/src/test/
    openejb/branches/misc/jpa-customid/src/test/java/
    openejb/branches/misc/jpa-customid/src/test/java/org/
    openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/
    openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/customid/
    openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/customid/CustomIdTest.java   (with props)
    openejb/branches/misc/jpa-customid/src/test/resources/
    openejb/branches/misc/jpa-nullrelation/
    openejb/branches/misc/jpa-nullrelation/pom.xml   (with props)
    openejb/branches/misc/jpa-nullrelation/src/
    openejb/branches/misc/jpa-nullrelation/src/main/
    openejb/branches/misc/jpa-nullrelation/src/main/java/
    openejb/branches/misc/jpa-nullrelation/src/main/java/org/
    openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/
    openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/
    openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/ABean.java   (with props)
    openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/BBean.java   (with props)
    openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/CBean.java   (with props)
    openejb/branches/misc/jpa-nullrelation/src/main/resources/
    openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/
    openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/ejb-jar.xml   (with props)
    openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/orm.xml   (with props)
    openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/persistence.xml   (with props)
    openejb/branches/misc/jpa-nullrelation/src/test/
    openejb/branches/misc/jpa-nullrelation/src/test/java/
    openejb/branches/misc/jpa-nullrelation/src/test/java/org/
    openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/
    openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/nullrelation/
    openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/nullrelation/NullRelationTest.java   (with props)
    openejb/branches/misc/jpa-nullrelation/src/test/resources/
    openejb/branches/misc/jpa-nullrelation/src/test/resources/META-INF/
    openejb/branches/misc/jpa-nullrelation/src/test/resources/META-INF/ejb-jar.xml   (with props)
    openejb/branches/misc/moviefun-monitor/
    openejb/branches/misc/moviefun-monitor/pom.xml   (with props)
    openejb/branches/misc/moviefun-monitor/src/
    openejb/branches/misc/moviefun-monitor/src/main/
    openejb/branches/misc/moviefun-monitor/src/main/assembly/
    openejb/branches/misc/moviefun-monitor/src/main/assembly/client.xml   (with props)
    openejb/branches/misc/moviefun-monitor/src/main/java/
    openejb/branches/misc/moviefun-monitor/src/main/java/com/
    openejb/branches/misc/moviefun-monitor/src/main/java/org/
    openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/
    openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/moviefun/
    openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/moviefun/NotificationMonitor.java   (with props)
    openejb/branches/misc/moviefun-monitor/src/main/resources/
    openejb/branches/misc/moviefun-monitor/src/main/resources/META-INF/
    openejb/branches/misc/moviefun-monitor/src/main/resources/META-INF/ejb-jar.xml   (with props)
    openejb/branches/misc/moviefun-monitor/src/main/resources/jndi.properties   (with props)
    openejb/branches/misc/moviefun-monitor/src/main/resources/movie.png   (with props)
    openejb/branches/misc/moviefun-monitor/src/test/
    openejb/branches/misc/moviefun-monitor/src/test/java/
    openejb/branches/misc/moviefun-monitor/src/test/resources/

Added: openejb/branches/misc/jpa-customid/pom.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/pom.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/pom.xml (added)
+++ openejb/branches/misc/jpa-customid/pom.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+
+<!-- $Rev: 714127 $ $Date: 2008-11-14 12:27:54 -0800 (Fri, 14 Nov 2008) $ -->
+
+<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>
+  <groupId>org.superbiz</groupId>
+  <artifactId>jpa-customid</artifactId>
+  <packaging>jar</packaging>
+  <version>1.1-SNAPSHOT</version>
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <id>apache-m2-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+    </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>5.0-3-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.4</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!--
+    The <scope>test</scope> guarantees that non of your runtime
+    code is dependent on any OpenEJB classes.
+    -->
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>3.1.2-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+  <!--
+  This section allows you to configure where to publish libraries for sharing.
+  It is not required and may be deleted.  For more information see:
+  http://maven.apache.org/plugins/maven-deploy-plugin/
+  -->
+  <distributionManagement>
+    <repository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/repo/</url>
+    </repository>
+    <snapshotRepository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/snapshot-repo/</url>
+    </snapshotRepository>
+  </distributionManagement>
+
+</project>

Propchange: openejb/branches/misc/jpa-customid/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/Invoice.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/Invoice.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/Invoice.java (added)
+++ openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/Invoice.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,73 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.customid;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class Invoice {
+
+    private int id;
+    private String brandName;
+    private double price;
+
+    private List<LineItem> lineItems = new ArrayList<LineItem>();
+
+    public Invoice() {
+    }
+
+    public Invoice(int id, String brandName, double price) {
+        this.id = id;
+        this.brandName = brandName;
+        this.price = price;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getBrandName() {
+        return brandName;
+    }
+
+    public void setBrandName(String brandName) {
+        this.brandName = brandName;
+    }
+
+    public double getPrice() {
+        return price;
+    }
+
+    public void setPrice(double price) {
+        this.price = price;
+    }
+
+    public List<LineItem> getLineItems() {
+        return lineItems;
+    }
+
+    public void setLineItems(List<LineItem> lineItems) {
+        this.lineItems = lineItems;
+    }
+}

Propchange: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/Invoice.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/InvoiceKey.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/InvoiceKey.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/InvoiceKey.java (added)
+++ openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/InvoiceKey.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.customid;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class InvoiceKey {
+
+    private int id;
+    private String brandName;
+
+    public InvoiceKey() {
+    }
+
+    public InvoiceKey(int id, String brandName) {
+        this.id = id;
+        this.brandName = brandName;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        InvoiceKey invoiceKey = (InvoiceKey) o;
+
+        if (id != invoiceKey.id) return false;
+        if (!brandName.equals(invoiceKey.brandName)) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = id;
+        result = 31 * result + brandName.hashCode();
+        return result;
+    }
+}

Propchange: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/InvoiceKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/LineItem.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/LineItem.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/LineItem.java (added)
+++ openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/LineItem.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.customid;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class LineItem {
+
+    private String id;
+    private int quantity;
+    private Invoice invoice;
+
+    public LineItem() {
+    }
+
+    public LineItem(String id, int quantity) {
+        this.id = id;
+        this.quantity = quantity;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public int getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(int quantity) {
+        this.quantity = quantity;
+    }
+
+    public Invoice getInvoice() {
+        return invoice;
+    }
+
+    public void setInvoice(Invoice invoice) {
+        this.invoice = invoice;
+    }
+}
+

Propchange: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/LineItem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestBean.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestBean.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestBean.java (added)
+++ openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestBean.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.customid;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.sql.DataSource;
+import javax.annotation.Resource;
+import javax.ejb.Stateless;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.util.List;
+
+@Stateless
+public class TestBean implements TestLocal {
+
+    @PersistenceContext
+    private EntityManager em;
+
+    @Resource
+    private DataSource dataSource;
+
+    public void sql(String sql) throws Exception {
+        Connection connection = dataSource.getConnection();
+        PreparedStatement preparedStatement = connection.prepareStatement(sql);
+        preparedStatement.execute();
+    }
+
+    public void tx1() {
+        Invoice invoice = new Invoice(1, "Red", 1.30);
+        LineItem item = new LineItem("1", 10);
+
+        item.setInvoice(invoice);
+        invoice.getLineItems().add(item);
+        em.persist(invoice);
+    }
+
+    public void tx2() {
+        Invoice invoice = em.find(Invoice.class, new InvoiceKey(1, "Red"));
+        List<LineItem> list = invoice.getLineItems();
+        System.out.println(list.size());
+    }
+}

Propchange: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestLocal.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestLocal.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestLocal.java (added)
+++ openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestLocal.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.customid;
+
+/**
+ * @version $Revision$ $Date$
+*/
+public interface TestLocal {
+
+    void sql(String sql) throws Exception;
+
+    void tx1();
+
+    void tx2();
+}

Propchange: openejb/branches/misc/jpa-customid/src/main/java/org/superbiz/customid/TestLocal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/resources/META-INF/ejb-jar.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/resources/META-INF/ejb-jar.xml (added)
+++ openejb/branches/misc/jpa-customid/src/main/resources/META-INF/ejb-jar.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1 @@
+<ejb-jar/>
\ No newline at end of file

Propchange: openejb/branches/misc/jpa-customid/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/resources/META-INF/orm.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/resources/META-INF/orm.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/resources/META-INF/orm.xml (added)
+++ openejb/branches/misc/jpa-customid/src/main/resources/META-INF/orm.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
+    <entity name="Invoice" class="org.superbiz.nullrelation.Invoice">
+        <table name="INVOICE"/>
+        <id-class class="org.superbiz.nullrelation.InvoiceKey"/>
+        <attributes>
+            <id name="id">
+                <column name="ID"/>
+            </id>
+            <id name="brandName">
+                <column name="BRANDNAME"/>
+            </id>
+            <basic name="price">
+                <column name="PRICE"/>
+            </basic>
+            <one-to-many name="lineItems" mapped-by="invoice">
+                <cascade>
+                    <cascade-all/>
+                </cascade>
+            </one-to-many>
+        </attributes>
+    </entity>
+    <entity name="LineItemBean" class="org.superbiz.nullrelation.LineItem">
+        <table name="ITEM"/>
+        <attributes>
+            <id name="id">
+                <column name="ID"/>
+            </id>
+            <basic name="quantity">
+                <column name="QUANTITY"/>
+            </basic>
+            <many-to-one name="invoice">
+                <join-column referenced-column-name="ID" name="FK_FOR_ID"/>
+                <join-column referenced-column-name="BRANDNAME" name="FK_FOR_BRANDNAME"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Propchange: openejb/branches/misc/jpa-customid/src/main/resources/META-INF/orm.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/main/resources/META-INF/persistence.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/main/resources/META-INF/persistence.xml (added)
+++ openejb/branches/misc/jpa-customid/src/main/resources/META-INF/persistence.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+<!-- START SNIPPET: code -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+
+  <persistence-unit name="test-unit">
+  </persistence-unit>
+</persistence>
+<!-- END SNIPPET: code -->

Propchange: openejb/branches/misc/jpa-customid/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/customid/CustomIdTest.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/customid/CustomIdTest.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/customid/CustomIdTest.java (added)
+++ openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/customid/CustomIdTest.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.customid;
+
+import junit.framework.TestCase;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import java.util.Properties;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class CustomIdTest extends TestCase {
+
+    public void test() throws Exception {
+
+        Properties p = new Properties();
+        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+        p.put("dataSource", "new://Resource?type=DataSource");
+
+        Context context = new InitialContext(p);
+        TestLocal bean = (TestLocal) context.lookup("TestBeanLocal");
+        bean.sql("CREATE MEMORY TABLE INVOICE(BRANDNAME VARCHAR(255) NOT NULL,ID INTEGER NOT NULL,PRICE NUMERIC,PRIMARY KEY(BRANDNAME,ID))");
+        bean.sql("CREATE MEMORY TABLE ITEM(ID VARCHAR(255) NOT NULL PRIMARY KEY,QUANTITY INTEGER,FK_FOR_ID INTEGER,FK_FOR_BRANDNAME VARCHAR(255))");
+
+        bean.tx1();
+        bean.tx2();
+
+
+    }
+}

Propchange: openejb/branches/misc/jpa-customid/src/test/java/org/superbiz/customid/CustomIdTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/pom.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/pom.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/pom.xml (added)
+++ openejb/branches/misc/jpa-nullrelation/pom.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+
+<!-- $Rev: 714127 $ $Date: 2008-11-14 12:27:54 -0800 (Fri, 14 Nov 2008) $ -->
+
+<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>
+  <groupId>org.superbiz</groupId>
+  <artifactId>jpa-nullrelation</artifactId>
+  <packaging>jar</packaging>
+  <version>1.1-SNAPSHOT</version>
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+      <!-- this configures the surefire plugin to run your tests with the javaagent enabled -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>pertest</forkMode>
+          <argLine>-javaagent:${basedir}/target/openejb-javaagent-3.1.2-SNAPSHOT.jar</argLine>
+          <workingDirectory>${basedir}/target</workingDirectory>
+        </configuration>
+      </plugin>
+
+      <!-- this tells maven to copy the openejb-javaagent jar into your target/ directory -->
+      <!-- where surefire can see it -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.openejb</groupId>
+                  <artifactId>openejb-javaagent</artifactId>
+                  <version>3.1.2-SNAPSHOT</version>
+                  <outputDirectory>${project.build.directory}</outputDirectory>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <id>apache-m2-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+    </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>5.0-3-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.4</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!--
+    The <scope>test</scope> guarantees that non of your runtime
+    code is dependent on any OpenEJB classes.
+    -->
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>3.1.2-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+  <!--
+  This section allows you to configure where to publish libraries for sharing.
+  It is not required and may be deleted.  For more information see:
+  http://maven.apache.org/plugins/maven-deploy-plugin/
+  -->
+  <distributionManagement>
+    <repository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/repo/</url>
+    </repository>
+    <snapshotRepository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/snapshot-repo/</url>
+    </snapshotRepository>
+  </distributionManagement>
+
+</project>

Propchange: openejb/branches/misc/jpa-nullrelation/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/ABean.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/ABean.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/ABean.java (added)
+++ openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/ABean.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.nullrelation;
+
+public class ABean {
+
+    private String id;
+    private String name;
+    private int value;
+
+    private BBean b;
+    private CBean Z;
+
+    public ABean() {
+    }
+
+    public ABean(String id, String name, int value) {
+        this.id = id;
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    public void setValue(int value) {
+        this.value = value;
+    }
+
+    public BBean getB() {
+        return b;
+    }
+
+    public void setB(BBean b) {
+        this.b = b;
+    }
+
+    public CBean getZ() {
+        return Z;
+    }
+
+    public void setZ(CBean z) {
+        this.Z = z;
+    }
+}

Propchange: openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/ABean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/BBean.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/BBean.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/BBean.java (added)
+++ openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/BBean.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.nullrelation;
+
+public class BBean {
+
+    private int value;
+    private java.lang.String name;
+    private java.lang.String id;
+    private CBean C;
+    private ABean a;
+
+    public BBean() {
+    }
+
+    public BBean(String id, String name, int value) {
+        this.id = id;
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    public void setValue(int value) {
+        this.value = value;
+    }
+
+    public ABean getA() {
+        return a;
+    }
+
+    public void setA(ABean a) {
+        this.a = a;
+    }
+
+    public CBean getC() {
+        return C;
+    }
+
+    public void setC(CBean c) {
+        C = c;
+    }
+}

Propchange: openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/BBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/CBean.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/CBean.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/CBean.java (added)
+++ openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/CBean.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.nullrelation;
+
+public class CBean {
+    
+    private String id;
+    private String name;
+    private int value;
+
+    private ABean a;
+    private BBean b;
+
+    public CBean() {
+    }
+
+    public CBean(String id, String name, int value) {
+        this.id = id;
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    public void setValue(int value) {
+        this.value = value;
+    }
+
+    public ABean getA() {
+        return a;
+    }
+
+    public void setA(ABean a) {
+        this.a = a;
+    }
+
+    public BBean getB() {
+        return b;
+    }
+
+    public void setB(BBean b) {
+        this.b = b;
+    }
+}

Propchange: openejb/branches/misc/jpa-nullrelation/src/main/java/org/superbiz/nullrelation/CBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/ejb-jar.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/ejb-jar.xml (added)
+++ openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/ejb-jar.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1 @@
+<ejb-jar/>
\ No newline at end of file

Propchange: openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/orm.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/orm.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/orm.xml (added)
+++ openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/orm.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
+  <entity name="ABean" class="org.superbiz.nullrelation.ABean">
+    <table name="ABEAN"/>
+    <attributes>
+      <id name="id">
+        <column name="ID"/>
+      </id>
+      <basic name="value">
+        <column name="VALUE"/>
+      </basic>
+      <basic name="name">
+        <column name="NAME"/>
+      </basic>
+      <one-to-one name="b" mapped-by="a"/>
+      <one-to-one name="Z" mapped-by="a"/>
+    </attributes>
+  </entity>
+  <entity name="BBean" class="org.superbiz.nullrelation.BBean">
+    <table name="BBEAN"/>
+    <attributes>
+      <id name="id">
+        <column name="ID"/>
+      </id>
+      <basic name="value">
+        <column name="VALUE"/>
+      </basic>
+      <basic name="name">
+        <column name="NAME"/>
+      </basic>
+      <one-to-one name="C" mapped-by="b"/>
+      <one-to-one name="a">
+        <join-column referenced-column-name="ID" name="FK_FOR_ABEAN"/>
+      </one-to-one>
+    </attributes>
+  </entity>
+  <entity name="CBean" class="org.superbiz.nullrelation.CBean">
+    <table name="CBEAN"/>
+    <attributes>
+      <id name="id">
+        <column name="ID"/>
+      </id>
+      <basic name="value">
+        <column name="VALUE"/>
+      </basic>
+      <basic name="name">
+        <column name="NAME"/>
+      </basic>
+      <one-to-one name="b">
+        <join-column referenced-column-name="ID" name="FK_FOR_BBEAN"/>
+      </one-to-one>
+      <one-to-one name="a">
+        <join-column referenced-column-name="ID" name="FK_FOR_ABEAN"/>
+      </one-to-one>
+    </attributes>
+  </entity>
+</entity-mappings>

Propchange: openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/orm.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/persistence.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/persistence.xml (added)
+++ openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/persistence.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+<!-- START SNIPPET: code -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+
+  <persistence-unit name="test-unit">
+    <class>org.superbiz.nullrelation.ABean</class>
+    <class>org.superbiz.nullrelation.BBean</class>
+    <class>org.superbiz.nullrelation.CBean</class>
+  </persistence-unit>
+</persistence>
+<!-- END SNIPPET: code -->

Propchange: openejb/branches/misc/jpa-nullrelation/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/nullrelation/NullRelationTest.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/nullrelation/NullRelationTest.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/nullrelation/NullRelationTest.java (added)
+++ openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/nullrelation/NullRelationTest.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.superbiz.nullrelation;
+
+import junit.framework.TestCase;
+import junit.framework.Assert;
+
+import javax.annotation.Resource;
+import javax.ejb.Stateless;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.util.Properties;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class NullRelationTest extends TestCase {
+
+    public void test() throws Exception {
+
+        Properties p = new Properties();
+        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+        p.put("dataSource", "new://Resource?type=DataSource");
+
+        Context context = new InitialContext(p);
+        TestLocal bean = (TestLocal) context.lookup("TestBeanLocal");
+        bean.sql("CREATE MEMORY TABLE ABEAN(ID VARCHAR(255) NOT NULL PRIMARY KEY,NAME VARCHAR(255),VALUE INTEGER)");
+        bean.sql("CREATE MEMORY TABLE CBEAN(ID VARCHAR(255) NOT NULL PRIMARY KEY,NAME VARCHAR(255),VALUE INTEGER,FK_FOR_BBEAN VARCHAR(255),FK_FOR_ABEAN VARCHAR(255))");
+        bean.sql("CREATE MEMORY TABLE BBEAN(ID VARCHAR(255) NOT NULL PRIMARY KEY,NAME VARCHAR(255),VALUE INTEGER,FK_FOR_ABEAN VARCHAR(255))");
+
+        bean.setup();
+        bean.test();
+    }
+
+    @Stateless
+    public static class TestBean implements TestLocal {
+
+        @PersistenceContext
+        private EntityManager em;
+
+        @Resource
+        private DataSource dataSource;
+
+        public void sql(String sql) throws Exception {
+            Connection connection = dataSource.getConnection();
+            PreparedStatement preparedStatement = connection.prepareStatement(sql);
+            preparedStatement.execute();
+        }
+
+        public void setup() throws Exception {
+            ABean aBean = new ABean("1", "a1", 1);
+            BBean bBean = new BBean("1", "b1", 1);
+            em.persist(aBean);
+            em.persist(bBean);
+            
+            CBean beanBean = new CBean("1", "c1", 1);
+            beanBean.setA(aBean);
+            beanBean.setB(bBean);
+            em.persist(beanBean);
+        }
+
+        public void test() throws Exception {
+
+            CBean c = em.find(CBean.class, 1);
+
+            ABean a = c.getA();
+            BBean b = c.getB();
+
+            BBean bRef = a.getB();
+            ABean aRef = b.getA();
+
+            // In the TCK test a1 and b1 should be null, but a1 is pointing to ABean 1
+            Assert.assertNull("A's reference to B should be null", bRef);
+            Assert.assertNull("B's reference to A should be null ", aRef);
+        }
+
+    }
+
+    public static interface TestLocal {
+        public void sql(String sql) throws Exception;
+        public void setup() throws Exception;
+        public void test() throws Exception;
+    }
+
+}

Propchange: openejb/branches/misc/jpa-nullrelation/src/test/java/org/superbiz/nullrelation/NullRelationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/jpa-nullrelation/src/test/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/jpa-nullrelation/src/test/resources/META-INF/ejb-jar.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/jpa-nullrelation/src/test/resources/META-INF/ejb-jar.xml (added)
+++ openejb/branches/misc/jpa-nullrelation/src/test/resources/META-INF/ejb-jar.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1 @@
+<ejb-jar/>
\ No newline at end of file

Propchange: openejb/branches/misc/jpa-nullrelation/src/test/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/moviefun-monitor/pom.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/moviefun-monitor/pom.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/moviefun-monitor/pom.xml (added)
+++ openejb/branches/misc/moviefun-monitor/pom.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+
+<!-- $Rev: 684173 $ $Date: 2008-08-08 20:13:24 -0700 (Fri, 08 Aug 2008) $ -->
+
+<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">
+  <parent>
+    <artifactId>acme-parent</artifactId>
+    <groupId>com.acmebank</groupId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>acme-bank-monitor</artifactId>
+  <packaging>jar</packaging>
+  <name>Acme :: Bank Monitor</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>5.0-3-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-api</artifactId>
+      <version>3.1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>3.1.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.2</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>attached</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <appendAssemblyId>false</appendAssemblyId>
+          <descriptor>src/main/assembly/client.xml</descriptor>
+          <archive>
+            <manifest>
+              <mainClass>org.superbiz.moviefun.NotificationMonitor</mainClass>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+  <!--
+  This section allows you to configure where to publish libraries for sharing.
+  It is not required and may be deleted.  For more information see:
+  http://maven.apache.org/plugins/maven-deploy-plugin/
+  -->
+  <distributionManagement>
+    <repository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/repo/</url>
+    </repository>
+    <snapshotRepository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/snapshot-repo/</url>
+    </snapshotRepository>
+  </distributionManagement>
+
+</project>
+

Propchange: openejb/branches/misc/moviefun-monitor/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/moviefun-monitor/src/main/assembly/client.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/moviefun-monitor/src/main/assembly/client.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/moviefun-monitor/src/main/assembly/client.xml (added)
+++ openejb/branches/misc/moviefun-monitor/src/main/assembly/client.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+
+<!-- $Rev: 779454 $ $Date: 2009-05-27 23:54:45 -0700 (Wed, 27 May 2009) $ -->
+
+<assembly>
+  <id>client</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>${basedir}</directory>
+      <outputDirectory>META-INF</outputDirectory>
+      <includes>
+        <include>README.txt</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory></outputDirectory>
+      <outputFileNameMapping></outputFileNameMapping>
+
+      <unpack>true</unpack>
+      <!--<includes>-->
+          <!--<include>org.apache.openejb:javaee-api</include>-->
+          <!--<include>org.apache.xbean:xbean-finder-shaded</include>-->
+          <!--<include>org.apache.xbean:xbean-asm-shaded</include>-->
+          <!--<include>junit:junit</include>-->
+          <!--<include>org.apache.openejb:openejb-itests-beans</include>-->
+          <!--<include>org.apache.openejb:openejb-itests-servlets</include>-->
+          <!--<include>org.apache.openejb:openejb-itests-client</include>-->
+          <!--<include>org.apache.openejb:openejb-client</include>-->
+
+          <!-- ActiveMQ -->
+          <!--<include>org.apache.activemq:activemq-core</include>-->
+          <!--<include>backport-util-concurrent:backport-util-concurrent</include>-->
+          <!--<include>commons-logging:commons-logging</include>-->
+      <!--</includes>-->
+    </dependencySet>
+  </dependencySets>
+</assembly>
+

Propchange: openejb/branches/misc/moviefun-monitor/src/main/assembly/client.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/moviefun/NotificationMonitor.java
URL: http://svn.apache.org/viewvc/openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/moviefun/NotificationMonitor.java?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/moviefun/NotificationMonitor.java (added)
+++ openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/moviefun/NotificationMonitor.java Sun Feb 21 21:47:25 2010
@@ -0,0 +1,83 @@
+package org.superbiz.moviefun;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.TextMessage;
+import javax.naming.NamingException;
+import javax.naming.InitialContext;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+public class NotificationMonitor {
+    private static TrayIcon trayIcon;
+
+    public static void main(String[] args) throws NamingException, InterruptedException, AWTException, MalformedURLException {
+        addSystemTrayIcon();
+
+        // Boot the embedded EJB Container 
+        new InitialContext();
+
+        System.out.println("Starting monitor...");
+    }
+
+    private static void addSystemTrayIcon() throws AWTException, MalformedURLException {
+        SystemTray tray = SystemTray.getSystemTray();
+
+        URL moviepng = NotificationMonitor.class.getClassLoader().getResource("movie.png");
+        Image image = Toolkit.getDefaultToolkit().getImage(moviepng);
+
+        ActionListener exitListener = new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                System.out.println("Exiting monitor...");
+                System.exit(0);
+            }
+        };
+
+        PopupMenu popup = new PopupMenu();
+        MenuItem defaultItem = new MenuItem("Exit");
+        defaultItem.addActionListener(exitListener);
+        popup.add(defaultItem);
+
+        trayIcon = new TrayIcon(image, "Notification Monitor", popup);
+        trayIcon.setImageAutoSize(true);
+        tray.add(trayIcon);
+
+
+    }
+
+    public static void showAlert(String message) {
+        synchronized (trayIcon) {
+            trayIcon.displayMessage("Alert received", message, TrayIcon.MessageType.WARNING);
+        }
+    }
+
+    @MessageDriven(activationConfig = {
+            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
+            @ActivationConfigProperty(propertyName = "destination", propertyValue = "notifications")})
+    public class NotificationsBean implements MessageListener {
+
+        public void onMessage(Message message) {
+            try {
+                TextMessage textMessage = (TextMessage) message;
+                String text = textMessage.getText();
+
+                System.out.println("");
+                System.out.println("====================================");
+                System.out.println("Notification received: " + text);
+                System.out.println("====================================");
+                System.out.println("");
+
+                NotificationMonitor.showAlert(text);
+            } catch (JMSException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}
\ No newline at end of file

Propchange: openejb/branches/misc/moviefun-monitor/src/main/java/org/superbiz/moviefun/NotificationMonitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/moviefun-monitor/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/branches/misc/moviefun-monitor/src/main/resources/META-INF/ejb-jar.xml?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/moviefun-monitor/src/main/resources/META-INF/ejb-jar.xml (added)
+++ openejb/branches/misc/moviefun-monitor/src/main/resources/META-INF/ejb-jar.xml Sun Feb 21 21:47:25 2010
@@ -0,0 +1 @@
+<ejb-jar />
\ No newline at end of file

Propchange: openejb/branches/misc/moviefun-monitor/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/moviefun-monitor/src/main/resources/jndi.properties
URL: http://svn.apache.org/viewvc/openejb/branches/misc/moviefun-monitor/src/main/resources/jndi.properties?rev=912414&view=auto
==============================================================================
--- openejb/branches/misc/moviefun-monitor/src/main/resources/jndi.properties (added)
+++ openejb/branches/misc/moviefun-monitor/src/main/resources/jndi.properties Sun Feb 21 21:47:25 2010
@@ -0,0 +1,4 @@
+java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory
+Default\ JMS\ Resource\ Adapter=new://Resource?type=ActiveMQResourceAdapter
+Default\ JMS\ Resource\ Adapter.BrokerXmlConfig=broker:vm://localhost
+Default\ JMS\ Resource\ Adapter.ServerUrl=tcp://10.211.55.2:61616

Propchange: openejb/branches/misc/moviefun-monitor/src/main/resources/jndi.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openejb/branches/misc/moviefun-monitor/src/main/resources/movie.png
URL: http://svn.apache.org/viewvc/openejb/branches/misc/moviefun-monitor/src/main/resources/movie.png?rev=912414&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openejb/branches/misc/moviefun-monitor/src/main/resources/movie.png
------------------------------------------------------------------------------
    svn:mime-type = image/png