You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2009/04/27 21:19:04 UTC

svn commit: r769112 - in /incubator/openwebbeans/trunk/webbeans-geronimo: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/webbeans/ src/main/java/org/apache/webbeans/spi/ src/main/java/org/apache/w...

Author: struberg
Date: Mon Apr 27 19:19:03 2009
New Revision: 769112

URL: http://svn.apache.org/viewvc?rev=769112&view=rev
Log:
OWB-74 initial geronimo/OpenEJB integration for JPA stuff (JtaEntityManager)

Added:
    incubator/openwebbeans/trunk/webbeans-geronimo/   (with props)
    incubator/openwebbeans/trunk/webbeans-geronimo/pom.xml
    incubator/openwebbeans/trunk/webbeans-geronimo/src/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/openejb/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/openejb/JPAServiceOpenEJBImpl.java
    incubator/openwebbeans/trunk/webbeans-geronimo/src/main/resources/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/MyEntity.java
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/OpenEJBIntegrationTest.java
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/ejb-jar.xml
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/openwebbeans/
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/openwebbeans/openwebbeans.properties
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/persistence.xml
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/embedded.logging.properties
    incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/log4j.properties   (with props)

Propchange: incubator/openwebbeans/trunk/webbeans-geronimo/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Apr 27 19:19:03 2009
@@ -0,0 +1,3 @@
+.classpath
+.project
+.settings

Added: incubator/openwebbeans/trunk/webbeans-geronimo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/pom.xml?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/pom.xml (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/pom.xml Mon Apr 27 19:19:03 2009
@@ -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.
+-->
+
+<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.openwebbeans</groupId>
+		<artifactId>openwebbeans</artifactId>
+		<version>1.0.0-incubating-SNAPSHOT</version>
+	</parent>
+    
+	<artifactId>openwebbeans-geronimo</artifactId>
+	<name>OpenWebBeans :: Geronimo integration</name>
+	<packaging>jar</packaging>
+	<version>1.0.0-incubating-SNAPSHOT</version>
+	<description>Geronimo intetration SPI implementations for the  OpenWebBeans Implementation</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-jpa</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-core</artifactId>
+<!--            <version>3.1.1-SNAPSHOT</version>-->
+            <version>3.0.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa</artifactId>
+            <version>1.2.1</version>
+            <scope>test</scope>
+        </dependency>
+ 
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <scope>test</scope>
+        </dependency>
+      
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- 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.0-beta-2.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.0-beta-2</version>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/openejb/JPAServiceOpenEJBImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/openejb/JPAServiceOpenEJBImpl.java?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/openejb/JPAServiceOpenEJBImpl.java (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/openejb/JPAServiceOpenEJBImpl.java Mon Apr 27 19:19:03 2009
@@ -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.apache.webbeans.spi.ee.openejb;
+
+import javax.inject.CreationException;
+import javax.naming.Context;
+import javax.naming.NameClassPair;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.persistence.JtaEntityManager;
+import org.apache.openejb.persistence.JtaEntityManagerRegistry;
+import org.apache.openejb.spi.ContainerSystem;
+import org.apache.webbeans.jpa.spi.JPAService;
+
+/**
+ * {@inheritDoc} 
+ * Implementation for getting the EntityManager and EntityManagerFactory 
+ * from the OpenEJB container.
+ */
+public class JPAServiceOpenEJBImpl implements JPAService 
+{
+
+    /**
+     * {@inheritDoc}
+     * This will create a JtaEntityManager instead of a simply JPA EntityManager.
+     * So injecting this into a bean should be perfectly safe!
+     */
+    public EntityManager getPersistenceContext( String unitName, String name ) {
+        // get JtaEntityManagerRegistry
+        JtaEntityManagerRegistry jtaEntityManagerRegistry = SystemInstance.get().getComponent(JtaEntityManagerRegistry.class);
+
+        EntityManagerFactory factory = getPersistenceUnit( unitName );
+
+        JtaEntityManager jtaEntityManager = new JtaEntityManager(jtaEntityManagerRegistry, factory, null, false);
+
+        return jtaEntityManager;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * We have to search for the shortest full match!
+     * if our searched PersistenceUnit should be "movieDb" and the
+     * persistence.xml contains "movieDbMirror and movieDb", then we must find the 2nd
+     * otoh we cannot simply search for the PersistencUnits name, because in JNDI
+     * it additionally contains a hash code at the end of the name string.
+     * @param unitName the name of the PersistenceUnit to search for
+     * @return EntitMa
+     */
+    public EntityManagerFactory getPersistenceUnit( String unitName ) {
+        EntityManagerFactory factory;
+        try {
+            Context context = SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext();
+
+            NamingEnumeration<NameClassPair> persUnits = context.list("java:openejb/PersistenceUnit");
+            if (persUnits == null)
+            {
+                throw new CreationException( "No PersistenceUnit found in java:openejb/PersistenceUnit!" );
+            }
+
+            String shortestMatch = null;
+            
+            while (persUnits.hasMore())
+            {
+                NameClassPair puNc = persUnits.next();
+                
+                if (puNc.getName().startsWith(unitName))
+                {
+                    if (shortestMatch == null || shortestMatch.length() > puNc.getName().length())
+                    {
+                        shortestMatch = puNc.getName();
+                    }
+                }
+                
+            }
+            
+            if (shortestMatch == null)
+            {
+                throw new CreationException("PersistenceUnit '" + unitName + "' not found");
+            }
+            
+            factory = (EntityManagerFactory) context.lookup("java:openejb/PersistenceUnit/" + shortestMatch);
+        } catch (NamingException e) {
+            throw new CreationException("PersistenceUnit '" + unitName + "' not found", e );
+        }
+        return factory;
+    }
+
+}

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/MyEntity.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/MyEntity.java?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/MyEntity.java (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/MyEntity.java Mon Apr 27 19:19:03 2009
@@ -0,0 +1,47 @@
+/*
+ * 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.apache.webbeans.test.geronimo.openejb;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class MyEntity {
+
+    @Id
+    @GeneratedValue
+    private int id;
+    
+    private String name;
+
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId( int id ) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+    
+    
+}

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/OpenEJBIntegrationTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/OpenEJBIntegrationTest.java?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/OpenEJBIntegrationTest.java (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/test/java/org/apache/webbeans/test/geronimo/openejb/OpenEJBIntegrationTest.java Mon Apr 27 19:19:03 2009
@@ -0,0 +1,59 @@
+/*
+ * 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.apache.webbeans.test.geronimo.openejb;
+
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
+import junit.framework.Assert;
+
+import org.apache.webbeans.jpa.spi.JPAService;
+import org.apache.webbeans.spi.ee.openejb.JPAServiceOpenEJBImpl;
+import org.junit.Test;
+
+
+public class OpenEJBIntegrationTest {
+
+    @Test
+    public void testIntegration() throws Exception 
+    {
+        Properties p = new Properties();
+        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+       
+        p.put("movieDatabase", "new://Resource?type=DataSource");
+        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+
+        p.put("movieDatabaseUnmanaged", "new://Resource?type=DataSource");
+        p.put("movieDatabaseUnmanaged.JdbcDriver", "org.hsqldb.jdbcDriver");
+        p.put("movieDatabaseUnmanaged.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+        p.put("movieDatabaseUnmanaged.JtaManaged", "false");
+        
+        Context context = new InitialContext(p);
+
+        //X Movies movies = (Movies) context.lookup("MoviesLocal");
+        JPAService jpaService = new JPAServiceOpenEJBImpl(); 
+        
+        EntityManagerFactory emf = jpaService.getPersistenceUnit( "TestUnit" );
+        Assert.assertNotNull( emf );
+        
+        EntityManager em = jpaService.getPersistenceContext( "TestUnit", null );
+        Assert.assertNotNull( em );
+    }
+
+}

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/ejb-jar.xml?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/ejb-jar.xml (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/ejb-jar.xml Mon Apr 27 19:19:03 2009
@@ -0,0 +1 @@
+<ejb-jar/>

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/openwebbeans/openwebbeans.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/openwebbeans/openwebbeans.properties?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/openwebbeans/openwebbeans.properties (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/openwebbeans/openwebbeans.properties Mon Apr 27 19:19:03 2009
@@ -0,0 +1,28 @@
+#---------------------------------------------------------------
+# The default configuration for OpenWebBeans
+#
+# The default configuration is intended for a JDK and a simple ServletContainer
+# like jetty, resin or tomcat.
+# 
+#---------------------------------------------------------------
+
+#general configuration section
+
+
+# the service section:
+# The key is the Interface, the value the implementation of the service
+
+# use the static HashMap instead of storing objects in JNDI as default  
+org.apache.webbeans.spi.JNDIService=org.apache.webbeans.spi.se.JNDIServiceStaticImpl
+
+# lookup the javax.transaction.TransactionManager via JNDI as default 
+org.apache.webbeans.spi.TransactionService=org.apache.webbeans.spi.ee.TransactionServiceJndiImpl
+
+# use the JPAService which retrieves the PersistenceManagerFactory from the Persistence class as default 
+org.apache.webbeans.spi.JPAService=org.apache.webbeans.spi.ee.openejb.JPAServiceOpenEJBImpl
+
+#use the web metadata as default
+org.apache.webbeans.spi.deployer.MetaDataDiscoveryService=org.apache.webbeans.spi.ee.deployer.WarMetaDataDiscoveryImpl
+
+#conversation service
+org.apache.webbeans.spi.conversation.ConversationService=org.apache.webbeans.spi.conversation.jsf.JSFConversationServiceImpl
\ No newline at end of file

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/persistence.xml?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/persistence.xml (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/META-INF/persistence.xml Mon Apr 27 19:19:03 2009
@@ -0,0 +1,36 @@
+<?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.
+-->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+    version="1.0">
+
+    <persistence-unit name="TestUnit">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> 
+<!--        <jta-data-source>testDatabase</jta-data-source>-->
+        <properties>
+            <property name="openjpa.jdbc.DBDictionary" value="hsql" />
+            <property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+            <property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:test" />
+            <property name="openjpa.ConnectionUserName" value="sa" />
+            <property name="openjpa.ConnectionPassword" value="" />
+
+        </properties>
+
+    </persistence-unit>
+</persistence>

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/embedded.logging.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/embedded.logging.properties?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/embedded.logging.properties (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/embedded.logging.properties Mon Apr 27 19:19:03 2009
@@ -0,0 +1,24 @@
+## ---------------------------------------------------
+## Nice alternate configuration for embedded testing
+##
+## Output is slightly more terse and sent to System.out
+##
+## Simply comment out the above declarations and
+## uncomment the configuration below.
+##
+#
+log4j.rootLogger                   = debug,C
+log4j.category.OpenEJB             = debug
+log4j.category.OpenEJB.server      = debug
+log4j.category.OpenEJB.startup     = debug
+log4j.category.OpenEJB.startup.service = debug
+log4j.category.OpenEJB.startup.config = debug
+log4j.category.OpenEJB.hsql        = debug
+log4j.category.CORBA-Adapter       = debug
+log4j.category.Transaction         = debug
+log4j.category.org.apache.activemq = error
+log4j.category.org.apache.geronimo = debug
+log4j.category.openjpa             = debug
+
+log4j.appender.C                           = org.apache.log4j.ConsoleAppender
+log4j.appender.C.layout                    = org.apache.log4j.SimpleLayout

Added: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/log4j.properties?rev=769112&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/log4j.properties (added)
+++ incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/log4j.properties Mon Apr 27 19:19:03 2009
@@ -0,0 +1,36 @@
+#	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.
+#
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+#%c category,p priority,d time,L line number,m message, n newline;
+
+
+#log4j.appender.file=org.apache.log4j.RollingFileAppender
+#log4j.appender.file.File=hsm-application.log
+#log4j.appender.file.MaxFileSize=10MB
+#log4j.appender.file.MaxBackupIndex=2
+#log4j.appender.file.Encoding=UTF-8
+#log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=<%d> %-5p [%c] : %m%n
+
+
+log4j.rootLogger=debug,stdout
+
+
+### Main project logger to info
+log4j.logger.org.apache.webbeans=debug
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/webbeans-geronimo/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:executable = *