-
1. Re: Seam, web services and business process context
nickarls Mar 18, 2008 12:12 PM (in response to chawax)Have you configured the seam handler as described in "20.1. Configuration and Packaging"?
-
2. Re: Seam, web services and business process context
chawax Mar 18, 2008 2:32 PM (in response to chawax)You are right, I had forgotten this. So I did it, it solved the problem for context variable, but businessProcess is still not injected. Do you see a reason why ?
-
3. Re: Seam, web services and business process context
chawax Mar 18, 2008 3:28 PM (in response to chawax)I tried to inject a POJO Seam component, same problem : injection does not work, so the problem doesn't deal with business processes. It looks like Seam interceptor is not runned. While I added the standard-jaxws-endpoint-config.xml file in /META-INF directory and I have this problem only when calling Seam component as a web service.
-
4. Re: Seam, web services and business process context
srini.ragu Mar 18, 2008 4:22 PM (in response to chawax)verify that seam interceptors are added in the META-INF/ejb-jar.xml
Given your webservice endpoint is an EJB, and also a seam component by having @Name annotation in it. It worked for me.
-
5. Re: Seam, web services and business process context
chawax Mar 18, 2008 5:01 PM (in response to chawax)Yes, I added them.
<interceptors> <interceptor> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor> </interceptors> <assembly-descriptor> <interceptor-binding> <ejb-name>*</ejb-name> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor-binding> </assembly-descriptor>
My Seam component is declared in components.xml file (my code is generated with AndroMDA and that's the choice they did) but I don't think it could cause a problem.
<component name="serviceAbsence" class="fr.xxx.t4.module.commons.absences.ServiceAbsenceBean" scope="STATELESS" />
The Seam component is also declared as an EJB in ejb-jar.xml :
<session> <description> <![CDATA[ ]]> </description> <ejb-name>ServiceAbsenceBean</ejb-name> <remote>fr.xxx.t4.module.commons.absences.ServiceAbsenceRemote</remote> <local>fr.xxx.t4.module.commons.absences.ServiceAbsenceLocal</local> <ejb-class>fr.xxx.t4.module.commons.absences.ServiceAbsenceBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> </session>
Do you use Seam 2.0.1.GA too ?
-
6. Re: Seam, web services and business process context
srini.ragu Mar 18, 2008 6:25 PM (in response to chawax)Yes.
@Stateless @WebService @WebContext(contextRoot="WebServices/services") @Name("listEjbService") public class ListServiceImpl2 implements ListService { @In(create=true, value=FactoryBean.COMPONENT_NAME) DomainFactory factoryBean;
verify the its registered as seam component in the startup by checking the server log. I did used the @Name annotation rather installing it thru components.xml
Please post root stack trace that would be helpful
-
7. Re: Seam, web services and business process context
chawax Mar 19, 2008 9:59 AM (in response to chawax)Well, you are right ... When I register my component with @Name annotation as you did, injection works (I have other problems I have to investigate, but injection works). When I register it with components.xml, injection doesn't work. In both cases anyway the component is well loaded on startup. And this problem occurs only when calling my Seam component as a web service. So it looks like there is a bug in the Seam handler for web services, doesn't it ?
-
8. Re: Seam, web services and business process context
pmuir Mar 19, 2008 1:08 PM (in response to chawax)Shane is away, therefore, so we don't loose this issue, please create a bug in JIRA, and attach an example of this that he can use to debug the issue.
-
9. Re: Seam, web services and business process context
chawax Mar 19, 2008 3:27 PM (in response to chawax)I filed a JIRA : http://jira.jboss.com/jira/browse/JBSEAM-2765
I attached a small example, a Maven project that can reproduce the problem on a very simple example. -
10. Re: Seam, web services and business process context
chawax Mar 19, 2008 4:22 PM (in response to chawax)By the way, I tried with the very latest release of Seam (2.1.0.A1) and there is the same problem.