Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1062697

Summary: [GSS] (6.2.x) Spring dependency injection doesn't work on endpoint instances
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Kyle Lape <klape>
Component: Web ServicesAssignee: Alessio Soldano <asoldano>
Status: CLOSED CURRENTRELEASE QA Contact: Rostislav Svoboda <rsvoboda>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.2.1CC: asoldano, klape, psakar, smumford, vtunka
Target Milestone: CR2   
Target Release: EAP 6.2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Spring beans declared in jbossws-cxf.xml where not injected into webservices endpoints also declared in the same descriptor. This is now solved and users can declare beans and have them injected properly in endpoints when Spring is installed on the server.
Story Points: ---
Clone Of: 1060001 Environment:
Last Closed: 2014-06-02 12:49:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1060001    
Bug Blocks: 1062711    
Attachments:
Description Flags
reproducer none

Description Kyle Lape 2014-02-07 18:11:06 UTC
+++ This bug was initially created as a clone of Bug #1060001 +++

If you create a bean in jbossws-cxf.xml and try to inject it into your endpoint, it doesn't work.

example:

   <bean id="ServiceImpl" class="org.apache.cxf.cxf1332.Cxf1332Impl">
      <property name="testBean" ref="testBean"/>
   </bean>

   <bean id="testBean" class="org.apache.cxf.cxf1332.TestBean"/>
   <jaxws:endpoint id="cxf1332" 
                   implementor="#ServiceImpl" 
                   address="http://localhost:${testutil.ports.Cxf1332Test}/Cxf1332"/>

Comment 1 JBoss JIRA Server 2014-02-11 12:55:45 UTC
Alessio Soldano <asoldano> updated the status of jira JBWS-3670 to Resolved

Comment 3 Kyle Lape 2014-03-03 17:23:22 UTC
Created attachment 870053 [details]
reproducer

Reproducer attached.

To run:

- set JBOSS_HOME env var
- install the org.springframework.spring module in JBoss
- start JBoss
- unzip project and cd to base folder
- run `ant deploy`
- run `ant test`

If no error, then the test passed, but if the injection didn't work, you should see an error like this:

     [java] Exception in thread "main" java.lang.RuntimeException: Bean not injected
     [java]     at com.redhat.gss.jaxws.Test.main(Test.java:25)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]     at java.lang.reflect.Method.invoke(Method.java:606)
     [java]     at org.jboss.modules.Module.run(Module.java:292)
     [java]     at org.jboss.modules.Main.main(Main.java:455)
     [java] Java Result: 1

Comment 4 Petr Sakaƙ 2014-03-04 13:54:30 UTC
Verified injection works with spring installed in module org.springframework.spring in slot main

Comment 5 Scott Mumford 2014-03-12 22:38:53 UTC
Does this issue require an entry in the EAP 6.2.2 Release Notes?

If so, please populate the details in the Doc Text field to allow ECS to begin drafting a note for it.

Note: "$THING was broken and now $THING is fixed" is not a suitable release note draft.

Comment 6 JBoss JIRA Server 2015-04-25 20:30:12 UTC
Alessio Soldano <asoldano> updated the status of jira JBWS-3670 to Closed