Pete,
Here is a report on the classloader situation just before I invoke my SLSB that sends
email:
| 15:15:36,972 INFO [WorkItemManagerBean]
| Just before asking my SLSB to send email using Seam Renderer...
| 15:15:36,972 INFO [WorkItemManagerBean] me ->
com.evergreen.accesscontrol.impl.WorkItemManagerBean
| 15:15:36,987 INFO [WorkItemManagerBean] my classloader ->
org.jboss.mx.loading.UnifiedClassLoader3@112bd54{
url=file:/C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp20053access-co
| ntrol-1.0.ear ,addedOrder=44}
| 15:15:36,987 INFO [WorkItemManagerBean] my classloader's parent ->
org.jboss.mx.loading.HeirarchicalLoaderRepository3$NoParentClassLoader@189346e
|
| 15:15:37,534 INFO [MailSenderBean] sending email:
mail/access-request-user-manager-rejected.xhtml
|
In this first case above, the mail typically fails because Facelets is trying to load
taglibs via the EAR's class loader - facelets is (was) packaged in the war - the ear
classloader can't see down into the war so the attempt to find the taglibs fails. For
now, I've put the facelets (and other) jars in both the ear and the war - the emails
are going out, but there are still some issues with some of the libraries.
In this next case, the emails were going out, in one of my previous posts, this is the
case where I discovered that when facelets gets invoked, it is correctly(?) using the
webapp classloader to hunt for taglibs. Here is the classloader report for the bean that
calls my SLSB mailsender:
| Just before asking my SLSB to send email using Seam Renderer...
| 15:20:35,206 INFO [WorkItemManagerBean] me ->
com.evergreen.accesscontrol.impl.WorkItemManagerBean
| 15:20:35,206 INFO [WorkItemManagerBean] my classloader ->
org.jboss.mx.loading.UnifiedClassLoader3@112bd54{
url=file:/C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp20053access-co
| ntrol-1.0.ear ,addedOrder=44}
| 15:20:35,206 INFO [WorkItemManagerBean] my classloader's parent ->
org.jboss.mx.loading.HeirarchicalLoaderRepository3$NoParentClassLoader@189346e
|
| 15:20:35,206 INFO [WorkItemManagerBean] Notifying requested
| 15:20:35,206 INFO [WorkItemManagerBean] dsaProvision() - about to send email...
| 15:20:35,206 INFO [MailSenderBean] sending email:
mail/access-request-complete-user.xhtml
|
this data may not be too helpful as to me, it looks like that at the starting point, both
method calls occur within the scope the same classloader....
looking at your classloader code in the previous post, I would thing you'ld want to do
something like:
| facesContext.getExternalContext().getClass().getClassLoader()
|
instead because, for example, in my case, the myfaces jars are packaged in the ear.
However the external context is supposed to return a ServletContext or PortletContext - I
assume that the Servlet/Portlet contexts use the webapp classloader...?
I appreciate your looking into this!
Thanks,
Brad Smith
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021730#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...