[seam-commits] Seam SVN: r13301 - in modules/security/trunk/examples/idmconsole: src/main/java/org/jboss/seam/security/examples/idmconsole and 3 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Jun 24 22:14:46 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-06-24 22:14:45 -0400 (Thu, 24 Jun 2010)
New Revision: 13301
Added:
modules/security/trunk/examples/idmconsole/idmconsole-ds.xml
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/action/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/action/EntityManagerProducer.java
modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/
modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml
Modified:
modules/security/trunk/examples/idmconsole/
Log:
added datasource
Property changes on: modules/security/trunk/examples/idmconsole
___________________________________________________________________
Name: svn:ignore
+ target
.classpath
.project
.settings
Added: modules/security/trunk/examples/idmconsole/idmconsole-ds.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/idmconsole-ds.xml (rev 0)
+++ modules/security/trunk/examples/idmconsole/idmconsole-ds.xml 2010-06-25 02:14:45 UTC (rev 13301)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>idmconsoleDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}idmconsole</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ </local-tx-datasource>
+
+ <mbean code="org.jboss.jdbc.HypersonicDatabase"
+ name="jboss:service=Hypersonic,database=idmconsole">
+ <attribute name="Database">idmconsole</attribute>
+ <attribute name="InProcessMode">true</attribute>
+ </mbean>
+
+</datasources>
+
Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/action/EntityManagerProducer.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/action/EntityManagerProducer.java (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/action/EntityManagerProducer.java 2010-06-25 02:14:45 UTC (rev 13301)
@@ -0,0 +1,16 @@
+package org.jboss.seam.security.examples.idmconsole.action;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+public class EntityManagerProducer
+{
+ @PersistenceContext EntityManager entityManager;
+
+ public @Produces @RequestScoped EntityManager produceEntityManager()
+ {
+ return entityManager;
+ }
+}
Added: modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml 2010-06-25 02:14:45 UTC (rev 13301)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
+ version="2.0">
+ <persistence-unit name="idmconsoleDatabase">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/idmconsoleDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="false"/>
+ </properties>
+ </persistence-unit>
+</persistence>
More information about the seam-commits
mailing list