Romain, i'm seeing @PreDestroy executed now, but honestly, I think I see it
executing sometimes. Sometimes, I don't see it execute, but I'll try to
watch more closely to see if @PreDestroy (on CDI @ApplicatonScoped) is
executing every time. :)

Thanks!


On Wed, Nov 21, 2012 at 8:05 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> Interesting...seems like it was just reported/created/updated/resolved
> today.  :)
>
> Created:Today 07:57 Updated:Today 07:58 Resolved:Today 07:58
>
> did you want to add me as reporter, or someone else reported it? is there
> a new snapshot JAR available for download with this fix?
>
>
>
> On Wed, Nov 21, 2012 at 7:59 AM, Romain Manni-Bucau <rmannibu...@gmail.com
> > wrote:
>
>> think it was a bug https://issues.apache.org/jira/browse/TOMEE-598
>>
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> *Github: https://github.com/rmannibucau*
>>
>>
>>
>>
>> 2012/11/21 Howard W. Smith, Jr. <smithh032...@gmail.com>
>>
>> > Romain,
>> >
>> > do you think this is a TomEE issue or CODI issue?
>> >
>> > Thanks,
>> > Howard
>> >
>> >
>> > On Wed, Nov 21, 2012 at 3:13 AM, Howard W. Smith, Jr. <
>> > smithh032...@gmail.com> wrote:
>> >
>> > > Instead, I added the following as the first lines in @PreDestroy
>> method
>> > on
>> > > CDI @ApplicationScoped bean.
>> > >
>> > >                 DerbyUtil util = null;
>> > >                 util.shutdown();
>> > >
>> > > And no NullPointerException raised like many other
>> NullPointerExceptions
>> > > that show up in the log...since I am still migrating from JSF managed
>> > beans
>> > > to CDI managed beans.  :)
>> > >
>> > >
>> > >
>> > > On Wed, Nov 21, 2012 at 2:20 AM, Romain Manni-Bucau <
>> > rmannibu...@gmail.com
>> > > > wrote:
>> > >
>> > >> Hi
>> > >>
>> > >> This is not mf related so dont bother them for it ;)
>> > >>
>> > >> Can you do a simple test please: replace your system.out by a file
>> > >> creation
>> > >> or a database insert
>> > >> Le 21 nov. 2012 07:44, "Howard W. Smith, Jr." <
>> smithh032...@gmail.com>
>> > a
>> > >> écrit :
>> > >>
>> > >> > As per the following,
>> > >> >
>> > >> > Java EE 6 Tutorial: Using the @PostConstruct and @PreDestroy
>> > Annotations
>> > >> > With CDI Managed Bean
>> > >> > Classes<http://docs.oracle.com/javaee/6/tutorial/doc/gmgkd.html>
>> > >> >
>> > >> > I assume that @PreDestroy method on CDI @ApplicationScoped bean
>> should
>> > >> be
>> > >> > invoked when I undeploy or shutdown TomEE (as this is working on
>> > >> Glassfish
>> > >> > 3.1.2.2 for JSF @ApplicationScoped managed bean). Please see below
>> and
>> > >> tell
>> > >> > me why TomEE server log does not show System.out.println()'s in the
>> > >> > @PreDestroy method on CDI @ApplicationScoped bean.
>> > >> >
>> > >> >
>> > >> > *TomEE server log*
>> > >> >
>> > >> > INFO: Undeploying app:
>> C:\Users\Public\NetBeansProjects\mcms\build\web
>> > >> > [EL Info]: 2012-11-20
>> > >> >
>> > >> >
>> > >>
>> >
>> 23:52:36.086--ServerSession(755502204)--file:/C:/Users/Public/NetBeansProjects/mcms/build/web/WEB-INF/classes/_mcmsPU
>> > >> > logout successful
>> > >> > Nov 20, 2012 11:52:37 PM org.apache.catalina.startup.HostConfig
>> > >> > deleteRedeployResources
>> > >> > INFO: Undeploying context [/mcmsweb]
>> > >> >
>> > >> >
>> > >> > *Glassfish 3.1.2.2 server log* (when undeploy app)
>> > >> >
>> > >> > INFO: ApplicationScopeBean.destroy() invoked
>> > >> > INFO: DerbyUtil.java: shutdown() invoked
>> > >> > INFO: DerbyUtil.java: loadDriver(): Loaded driver
>> > >> > (org.apache.derby.jdbc.EmbeddedDriver) successfully
>> > >> > INFO: DerbyUtil.java: shutdown(): Derby shut down normally
>> > >> > INFO: ApplicationScopeBean.destroy() invoked
>> > >> > INFO:
>> > >> >
>> > >> >
>> > >>
>> >
>> file:/D:/glassfish/glassfish/domains/domain1/applications/mcms/WEB-INF/classes/_mcmsPU
>> > >> > logout successful
>> > >> >
>> > >> >
>> > >> > Thanks,
>> > >> > Howard
>> > >> >
>> > >> > P.S., I would send to myfaces user list, too, but I get mailer
>> daemon
>> > >> > emails from burntmail.com whenever I send to that user email
>> list. I
>> > >> hope
>> > >> > someone did not mark my email address as ....
>> > >> >
>> > >>
>> > >
>> > >
>> >
>>
>
>

Reply via email to