Bug 1062697 - [GSS] (6.2.x) Spring dependency injection doesn't work on endpoint instances
Summary: [GSS] (6.2.x) Spring dependency injection doesn't work on endpoint instances
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services
Version: 6.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR2
: EAP 6.2.2
Assignee: Alessio Soldano
QA Contact: Rostislav Svoboda
Russell Dickenson
URL:
Whiteboard:
Depends On: 1060001
Blocks: 1062711
TreeView+ depends on / blocked
 
Reported: 2014-02-07 18:11 UTC by Kyle Lape
Modified: 2018-12-06 15:50 UTC (History)
5 users (show)

Fixed In Version:
Clone Of: 1060001
Environment:
Last Closed: 2014-06-02 12:49:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer (9.34 KB, application/zip)
2014-03-03 17:23 UTC, Kyle Lape
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBWS-3670 0 Major Closed Spring declared endpoints, AS components and injection 2015-04-25 20:30:11 UTC

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


Note You need to log in before you can comment on or make changes to this bug.