dev@glassfish.java.net

Re: web container and JTA

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Mon, 24 Aug 2009 16:52:57 -0700

On Aug 24, 2009, at 4:53 PM, Marina Vatkina wrote:

> Jerome Dochez wrote:
>> Jan, Marina
>> when debugging web container in embedded mode, I ran into the
>> following issue :
>> SEVERE: Cannot stop module web
>> java.lang.NullPointerException
>> at
>> com
>> .sun
>> .web
>> .server
>> .J2EEInstanceListener.handleAfterEvent(J2EEInstanceListener.java:
>> 373)
>> at
>> com
>> .sun
>> .web
>> .server
>> .J2EEInstanceListener.instanceEvent(J2EEInstanceListener.java: 117)
>> at
>> org
>> .apache
>> .catalina
>> .util.InstanceSupport.fireInstanceEvent(InstanceSupport.java: 384)
>> at
>> org
>> .apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:
>> 1703)
>> at
>> org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:
>> 2048)
>> at
>> org.apache.catalina.core.StandardContext.stop(StandardContext.java:
>> 5447)
>> this happened because J2EEInstanceListener relies on
>> private JavaEETransactionManager tm;
>> to be initialized correctly.
>> However, webtier-all does not list
>> <dependency>
>> <groupId>org.glassfish.transaction</groupId>
>> <artifactId>jta</artifactId>
>> </dependency>
>
> It should depend only in
> <artifactId>transaction-internal-api</artifactId>
>
> Which contains the interface JavaEETransactionManager.
and it does since the type is found

> None of the modules outside transaction should depend on the impl
> type.
the point is that the code cannot leave without an implementation
being provided so it should protect itself when none is provided
(option 1 below).

>
> Regards,
> -marina
>
>> as a dependency so I got the NPE.
>> It seems to be me that either :
>> 1. J2EEInstanceListener should protect itself against tm being
>> null.
>> 2. add jta to webtier-all.
>> jerome
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>