Author: dallen6
Date: 2009-03-13 07:12:05 -0400 (Fri, 13 Mar 2009)
New Revision: 1966
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java
Log:
Changes for JIRA issue WBRI-177
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-13 11:08:13
UTC (rev 1965)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-13 11:12:05
UTC (rev 1966)
@@ -899,12 +899,12 @@
return namingContext;
}
- public EjbResolver getEjbResolver()
+ public final EjbResolver getEjbResolver()
{
return ejbResolver;
}
- public ResourceLoader getResourceLoader()
+ public final ResourceLoader getResourceLoader()
{
return resourceLoader;
}
@@ -915,7 +915,7 @@
*
* @return a TransactionServices provider per the SPI
*/
- public TransactionServices getTransactionServices()
+ public final TransactionServices getTransactionServices()
{
return transactionServices;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-13
11:08:13 UTC (rev 1965)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-13
11:12:05 UTC (rev 1966)
@@ -83,7 +83,7 @@
}
if (getTransactionServices() == null)
{
- throw new IllegalStateException("TransactionServices is not set");
+ log.info("Transactional services not available. Transactional observers
will be invoked synchronously.");
}
this.manager = new ManagerImpl(getNamingContext(), getEjbResolver(),
getResourceLoader(), getTransactionServices());
getManager().getNaming().bind(ManagerImpl.JNDI_KEY, getManager());
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java 2009-03-13
11:08:13 UTC (rev 1965)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java 2009-03-13
11:12:05 UTC (rev 1966)
@@ -87,7 +87,7 @@
@Override
public void notify(T event)
{
- if (manager.getTransactionServices().isTransactionActive())
+ if ((manager.getTransactionServices() != null) &&
(manager.getTransactionServices().isTransactionActive()))
{
deferEvent(event);
}