[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Sun Jun 24 02:34:32 EDT 2007
User: gavin
Date: 07/06/24 02:34:32
Modified: src/main/org/jboss/seam/core Events.java
Removed: src/main/org/jboss/seam/core
BasicTransactionListener.java
EjbTransactionListener.java
LocalTransactionListener.java
TransactionListener.java
Log:
got rid of TransactionListener, merged with the Transaction package, for more consistent behavior across diff types of tx management
Revision Changes Path
1.34 +16 -15 jboss-seam/src/main/org/jboss/seam/core/Events.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Events.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Events.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- Events.java 22 Jun 2007 15:28:56 -0000 1.33
+++ Events.java 24 Jun 2007 06:34:32 -0000 1.34
@@ -120,27 +120,28 @@
*/
public void raiseTransactionSuccessEvent(String type, Object... parameters)
{
- getTransactionListener().scheduleEvent(type, parameters);
+ getDispatcher().scheduleTransactionSuccessEvent(type, parameters);
}
- private TransactionListener getTransactionListener()
+ /**
+ * Raise an event that is to be processed after the current transaction
+ * ends
+ *
+ * @param type the event type
+ * @param parameters parameters to be passes to the listener method
+ */
+ public void raiseTransactionCompletionEvent(String type, Object... parameters)
{
- TransactionListener transactionListener = BasicTransactionListener.instance();
- if (transactionListener==null)
- {
- throw new IllegalStateException("org.jboss.seam.core.transactionListener is not installed");
- }
- return transactionListener;
+ getDispatcher().scheduleTransactionCompletionEvent(type, parameters);
}
+ /**
+ * @return the Dispatcher object to use for dispatching asynchronous
+ * and timed events
+ */
protected Dispatcher getDispatcher()
{
- Dispatcher dispatcher = AbstractDispatcher.instance();
- if (dispatcher==null)
- {
- throw new IllegalStateException("org.jboss.seam.async.dispatcher is not installed");
- }
- return dispatcher;
+ return AbstractDispatcher.instance();
}
public static boolean exists()
More information about the jboss-cvs-commits
mailing list