[
https://jira.jboss.org/jira/browse/JBWS-2558?page=com.atlassian.jira.plug...
]
Richard Opalka updated JBWS-2558:
---------------------------------
Summary: Component's resources defined in the \<env-entry\> are not
available to the handlers for EJB3-based WS components. (was: Component's resources
defined in the \<env-entry\> are not available to the handlers via JNDI for
EJB3-based WS components.)
Component's resources defined in the \<env-entry\> are not
available to the handlers for EJB3-based WS components.
------------------------------------------------------------------------------------------------------------------
Key: JBWS-2558
URL:
https://jira.jboss.org/jira/browse/JBWS-2558
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-native
Affects Versions: jbossws-native-3.1.1
Reporter: Gang Yang
Assignee: Richard Opalka
Priority: Critical
Fix For: jbossws-native-3.1.2, jbossws-native-3.2.0
While the resources defined in \<env-entry\> are not injected using the @Resource
in handlers for both Web and EJB3 containers (an issue has been created for this problem),
they are not available via JNDI lookup from handlers for EJB3 container as the JSR 109
requires. Therefore, for EJB3-based WS components, there's no way to pass any data
into the associated handlers. I tried this on both JBossAS 4.2.2.GA (JBossWS 2.0.1) and
JBoss 5.0.0.GA (JBossWS 3.0.4). Here's the details on the code:
- A simple EJB3 stateless session bean annotated with @WebService and @HandlerChain
- ejb-jar.xml has the following \<env-entry\> definition for the session bean:
\<env-entry\>
\<env-entry-name\>configFile\<env-entry-name\>
\<env-entry-type\>java.lang.String\<env-entry-type\>
\<env-entry-value\>TestService2HandlerConfig.xml\<env-entry-value\>
\<env-entry\>
- The hanler is a SOAP handler and has the following code segment:
@Resource(name="configFile")
String configFile;
....
@PostConstruct
public void init() {
if (configFile == null) {
InitialContext icxt = new InitialContext();
Context myEnv = icxt.lookup("java:comp/env");
configFile = (String)myEnv.lookup("configFile");
....
Note: the same handler configured for Web-container WS endpoints works OK - although
configFile is not injected by @Resource, but at least it looked up fine using JNDI.
Can this be fixed more easily and therefore earlier since it already works for Web
container based WS endpoint/handler? This is a show stopper since there's no way to
pass in info into the handler for EJB3 based WS endpoint/handler.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira