Author: jeff.yuchang
Date: 2009-05-28 07:27:59 -0400 (Thu, 28 May 2009)
New Revision: 538
Added:
idm/trunk/integration/deployer/src/main/resources/META-INF/jboss-dependency.xml
Modified:
idm/trunk/integration/deployer/pom.xml
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java
idm/trunk/integration/deployer/src/main/resources/META-INF/idm-deployer-jboss-beans.xml
idm/trunk/integration/deployer/src/main/resources/deployer-assembly.xml
idm/trunk/integration/deployer/src/main/resources/idm-assembly.xml
Log:
* Update the TransactionManager injection.
* Add the jboss-dependency for the datasource.
Modified: idm/trunk/integration/deployer/pom.xml
===================================================================
--- idm/trunk/integration/deployer/pom.xml 2009-05-26 18:52:06 UTC (rev 537)
+++ idm/trunk/integration/deployer/pom.xml 2009-05-28 11:27:59 UTC (rev 538)
@@ -18,6 +18,7 @@
<properties>
<jboss.version>5.0.0.GA</jboss.version>
+ <jboss.deployers.version>2.0.3.GA</jboss.deployers.version>
</properties>
<dependencies>
@@ -99,16 +100,40 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-system-jmx</artifactId>
- <version>${jboss.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
<version>1.3.0</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client</artifactId>
+ <version>${jboss.deployers.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-structure-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
@@ -128,10 +153,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
<configuration>
<excludes>
<exclude>META-INF/*.xml</exclude>
- <exclude>*.xml</exclude>
+ <exclude>**/*.xml</exclude>
</excludes>
</configuration>
</plugin>
@@ -160,8 +186,8 @@
<goal>single</goal>
</goals>
<configuration>
- <finalName>idm.config</finalName>
- <appendAssemblyId>false</appendAssemblyId>
+ <finalName>idm-service.sar</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
<descriptors>
<descriptor>src/main/resources/idm-assembly.xml</descriptor>
</descriptors>
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java 2009-05-26
18:52:06 UTC (rev 537)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java 2009-05-28
11:27:59 UTC (rev 538)
@@ -20,7 +20,6 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.identity.idm.api.IdentitySessionFactory;
import org.jboss.identity.idm.api.cfg.IdentityConfiguration;
-import org.jboss.identity.idm.common.transaction.TransactionManagerProvider;
import org.jboss.identity.idm.common.transaction.Transactions;
import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
import org.jboss.identity.idm.impl.configuration.jaxb2.JAXB2IdentityConfiguration;
@@ -45,6 +44,8 @@
private IdentitySessionFactory idSF;
+ private TransactionManager transactionManager;
+
public IDMDeployer() {
super(IDMMetadata.class);
}
@@ -86,8 +87,7 @@
}
try {
- TransactionManager tm =
TransactionManagerProvider.JBOSS_PROVIDER.getTransactionManager();
- Transactions.required(tm, new Transactions.Runnable()
+ Transactions.required(transactionManager, new Transactions.Runnable()
{
public Object run() throws Exception
{
@@ -165,6 +165,17 @@
logger.fine("could not get database version from JDBC metadata");
return 0;
}
- }
+ }
+ public TransactionManager getTransactionManager() {
+ return transactionManager;
+ }
+
+ public void setTransactionManager(TransactionManager transactionManager) {
+ this.transactionManager = transactionManager;
+ }
+
+
+
+
}
Modified:
idm/trunk/integration/deployer/src/main/resources/META-INF/idm-deployer-jboss-beans.xml
===================================================================
---
idm/trunk/integration/deployer/src/main/resources/META-INF/idm-deployer-jboss-beans.xml 2009-05-26
18:52:06 UTC (rev 537)
+++
idm/trunk/integration/deployer/src/main/resources/META-INF/idm-deployer-jboss-beans.xml 2009-05-28
11:27:59 UTC (rev 538)
@@ -16,6 +16,10 @@
The actual IDM Deployer
-->
<bean name="org.jboss.identity.idm:service=Deployer"
-
class="org.jboss.identity.idm.integration.jboss5.IDMDeployer"/>
+ class="org.jboss.identity.idm.integration.jboss5.IDMDeployer">
+ <property name="transactionManager">
+ <inject bean="RealTransactionManager"
option="callback"/>
+ </property>
+ </bean>
</deployment>
\ No newline at end of file
Added: idm/trunk/integration/deployer/src/main/resources/META-INF/jboss-dependency.xml
===================================================================
--- idm/trunk/integration/deployer/src/main/resources/META-INF/jboss-dependency.xml
(rev 0)
+++
idm/trunk/integration/deployer/src/main/resources/META-INF/jboss-dependency.xml 2009-05-28
11:27:59 UTC (rev 538)
@@ -0,0 +1,3 @@
+<dependency xmlns="urn:jboss:dependency:1.0">
+ <item whenRequired="Real"
dependentState="Installed">jboss.jca:service=DataSourceBinding,name=jbossidmDS</item>
+</dependency>
\ No newline at end of file
Modified: idm/trunk/integration/deployer/src/main/resources/deployer-assembly.xml
===================================================================
--- idm/trunk/integration/deployer/src/main/resources/deployer-assembly.xml 2009-05-26
18:52:06 UTC (rev 537)
+++ idm/trunk/integration/deployer/src/main/resources/deployer-assembly.xml 2009-05-28
11:27:59 UTC (rev 538)
@@ -1,6 +1,6 @@
<assembly
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/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id></id>
+ <id>deployer</id>
<formats>
<format>zip</format>
</formats>
Modified: idm/trunk/integration/deployer/src/main/resources/idm-assembly.xml
===================================================================
--- idm/trunk/integration/deployer/src/main/resources/idm-assembly.xml 2009-05-26 18:52:06
UTC (rev 537)
+++ idm/trunk/integration/deployer/src/main/resources/idm-assembly.xml 2009-05-28 11:27:59
UTC (rev 538)
@@ -1,6 +1,6 @@
<assembly
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/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id></id>
+ <id>config</id>
<formats>
<format>zip</format>
</formats>
@@ -12,8 +12,8 @@
<includes>
<include>jboss.idm.cfg.xml</include>
<include>jboss.idm.hibernate.cfg.xml</include>
- <include>jbidm-hsqldb-ds.xml</include>
<include>META-INF/default-jboss-idm.xml</include>
+ <include>META-INF/jboss-dependency.xml</include>
</includes>
</fileSet>
</fileSets>