[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Thu Nov 2 12:06:11 EST 2006
User: gavin
Date: 06/11/02 12:06:11
Modified: src/main/org/jboss/seam/core Init.java
Log:
better impl of settable TM and UT locations
Revision Changes Path
1.27 +44 -1 jboss-seam/src/main/org/jboss/seam/core/Init.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Init.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Init.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- Init.java 10 Oct 2006 19:37:37 -0000 1.26
+++ Init.java 2 Nov 2006 17:06:11 -0000 1.27
@@ -1,4 +1,4 @@
-//$Id: Init.java,v 1.26 2006/10/10 19:37:37 gavin Exp $
+//$Id: Init.java,v 1.27 2006/11/02 17:06:11 gavin Exp $
package org.jboss.seam.core;
@@ -12,12 +12,14 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Intercept;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Expressions.MethodBinding;
import org.jboss.seam.core.Expressions.ValueBinding;
+import org.jboss.seam.util.Transactions;
/**
* A Seam component that holds Seam configuration settings
@@ -35,12 +37,27 @@
private String jndiPattern;
private boolean debug;
private boolean myFacesLifecycleBug;
+ private String userTransactionName;
+ private String transactionManagerName;
private Map<String, List<ObserverMethod>> observers = new HashMap<String, List<ObserverMethod>>();
private Map<String, FactoryMethod> factories = new HashMap<String, FactoryMethod>();
private Map<String, FactoryBinding> factoryMethodBindings = new HashMap<String, FactoryBinding>();
private Map<String, FactoryBinding> factoryValueBindings = new HashMap<String, FactoryBinding>();
+ @Create
+ public void create()
+ {
+ if (transactionManagerName!=null)
+ {
+ Transactions.setTransactionManagerName(transactionManagerName);
+ }
+ if (userTransactionName!=null)
+ {
+ Transactions.setUserTransactionName(userTransactionName);
+ }
+ }
+
public static Init instance()
{
if ( !Contexts.isApplicationContextActive() )
@@ -212,4 +229,30 @@
this.jbpmInstalled = jbpmInstalled;
}
+ /**
+ * The JNDI name of the JTA TransactionManager
+ */
+ protected String getTransactionManagerName()
+ {
+ return transactionManagerName;
+ }
+
+ protected void setTransactionManagerName(String transactionManagerName)
+ {
+ this.transactionManagerName = transactionManagerName;
+ }
+
+ /**
+ * The JNDI name of the JTA UserTransaction
+ */
+ protected String getUserTransactionName()
+ {
+ return userTransactionName;
+ }
+
+ protected void setUserTransactionName(String userTransactionName)
+ {
+ this.userTransactionName = userTransactionName;
+ }
+
}
More information about the jboss-cvs-commits
mailing list