Hi,

While creating a user account, I'm trying to invoke an asynchronous method in 
my SLSB to send the activation mail. In my activation mail template, I'm trying 
to resolve the activation URL dynamically instead of having a static one.

I tried the following methods and none of them gets the correct URL:

<s:link> - resolves to /project/activation.seam - I don't know where the 
project is coming from 'cause that is not my application context path

#{facesContext.externalContext.requestContextPath} - resolves to null

defined a factory variable and try to use #{basePath} - resolves to null
<factory name="basePath" scope="APPLICATION" 
value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/"/>

finally tried to inject facesContext in the SLSB that renders the mail 
template, and it fails to inject.

Finally concluded that it is 'cause of asynchronous method. I think it looses 
all the contexts when it is run. If I make it synchronous, everything works 
fine.

Has anyone come across this problem? Is there a way to set contexts for 
asynchronous methods?

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058956#4058956

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058956
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to