[JBoss JIRA] Created: (JBWS-1402) Ejb3 JMSTransportSupport
by John Gilbert (JIRA)
Ejb3 JMSTransportSupport
------------------------
Key: JBWS-1402
URL: http://jira.jboss.com/jira/browse/JBWS-1402
Project: JBoss Web Services
Issue Type: Patch
Security Level: Public (Everyone can see)
Environment: I made these changes to work with JBossWS 1.0.3 and JBoss AS 4.0.4.
Reporter: John Gilbert
Allow the use of Ejb3 MDBs to support soap over jms. Note: This is a different solution then outlined in the referenced forum discussion.
Here is a sample Ejb3 MDB which is also annotated with JWS annotations:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/AuthorizationCallbackQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "AUTO_ACKNOWLEDGE"),
@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable") })
@WebService(name = "AuthorizationCallbackService", serviceName = "AuthorizationCallbackService")
@SOAPBinding(style = Style.RPC, use = Use.LITERAL, parameterStyle = ParameterStyle.BARE)
@SOAPMessageHandlers( { @SOAPMessageHandler(className = "org.jboss.ws.wsse.WSSecurityHandlerInbound") })
@SecurityDomain("portal")
public class AuthorizationCallbackMDB extends JMSTransportSupport implements MessageListener {
@WebMethod
@Oneway
public void authorizationResponse(@WebParam(name = "paymentId") long paymentId, @WebParam(name = "status") boolean status) throws java.rmi.RemoteException {
...
}
}
The following changes where made to get this to work:
jbossws-core.jar -> org.jboss.ws.server.ServiceEndpointInfo constructor
} else if (udi.type == UnifiedDeploymentInfo.Type.JSR181_EJB3) {
String ejbName = sepMetaData.getLinkName();
UnifiedApplicationMetaData applMetaData = (UnifiedApplicationMetaData) udi.metaData;
UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData) applMetaData
.getBeanByEjbName(ejbName);
if (beanMetaData instanceof UnifiedMessageDrivenMetaData) {
this.type = Type.MDB21;
} else {
this.type = Type.SLSB30;
}
}
jbossws-jboss-integration.jar -> org.jboss.ws.integration.jboss.DeployerInterceptorEJB3
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws Exception {
...
for (Object container : ejb3Module.getContainers().values()) {
if (container instanceof StatelessContainer) {
StatelessContainer slc = (StatelessContainer) container;
UnifiedBeanMetaData uslc = new UnifiedBeanMetaData();
uslc.setEjbName(slc.getEjbName());
uslc.setEjbClass(slc.getBeanClassName());
beans.add(uslc);
}
if (container instanceof MDB) {
MDB mdc = (MDB) container;
if (mdc.resolveAnnotation(WebService.class) != null) {
UnifiedBeanMetaData umdc = new UnifiedMessageDrivenMetaData();
umdc.setEjbName(mdc.getEjbName());
umdc.setEjbClass(mdc.getBeanClassName());
ActivationConfigPropertyMetaData p = (ActivationConfigPropertyMetaData) mdc
.getActivationConfigProperties().get("destination");
((UnifiedMessageDrivenMetaData) umdc)
.setDestinationJndiName(p.getValue());
beans.add(umdc);
}
}
}
...
}
protected boolean isWebserviceDeployment(DeploymentInfo di) {
...
for (Object manager : ejb3Module.getContainers().values()) {
if (manager instanceof StatelessContainer) {
StatelessContainer container = (StatelessContainer) manager;
if (container.resolveAnnotation(WebService.class) != null) {
isWebserviceDeployment = true;
break;
}
}
if (manager instanceof MDB) {
MDB container = (MDB) manager;
if (container.resolveAnnotation(WebService.class) != null) {
isWebserviceDeployment = true;
break;
}
}
}
...
}
The only thing I couldn't fix was the generated endpoint address in the wsdl. It still comes out like this
<soap:address location='http://localhost:8080/payment-authorizer-0/AuthorizationCallbackMDB'/>
instead of something like this
<soap:address location='jms://localhost/queue/AuthorizationCallbackQueue'/>
On a similar note I have created a straight forward jboss remoting JmsClientInvoker. It only works with Oneway messages, which is reasonable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBWS-1395) Add a Standard All Client Configuration to standard-jbossws-client-config.xml
by John Gilbert (JIRA)
Add a Standard All Client Configuration to standard-jbossws-client-config.xml
-----------------------------------------------------------------------------
Key: JBWS-1395
URL: http://jira.jboss.com/jira/browse/JBWS-1395
Project: JBoss Web Services
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: jaxws
Reporter: John Gilbert
Priority: Trivial
It would be nice to have this in addition to Standard Client, Standard Secure Client, and Standard Addressing Client, so that all clients don't have to create their config file.
<client-config>
<config-name>Standard All Client</config-name>
<post-handler-chain>
<handler-chain-name>PostHandlerChain</handler-chain-name>
<handler>
<j2ee:handler-name>WSSecurityHandlerOutbound</j2ee:handler-name>
<j2ee:handler-class>org.jboss.ws.wsse.WSSecurityHandlerOutbound</j2ee:handler-class>
</handler>
<handler>
<j2ee:handler-name>SOAPClientHandler</j2ee:handler-name>
<j2ee:handler-class>org.jboss.ws.addressing.soap.SOAPClientHandler</j2ee:handler-class>
</handler>
</post-handler-chain>
</client-config>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 11 months
[JBoss JIRA] Created: (JBWS-1314) Precursor to streaming optimizations, elimination of xmlFragment
by Thomas Diesler (JIRA)
Precursor to streaming optimizations, elimination of xmlFragment
----------------------------------------------------------------
Key: JBWS-1314
URL: http://jira.jboss.com/jira/browse/JBWS-1314
Project: JBoss Web Services
Issue Type: Task
Security Level: Public (Everyone can see)
Components: jaxws
Reporter: Thomas Diesler
Fix For: jbossws-2.0.1
At some point, we should remove the xml string fragment processing phase. It's not needed in our long term streaming optimization plan, and it adds unneeded performance overhead in the current design.
Instead we could pass the corresponding DOM chunk directly to the marshalling layer. JAXB supports this using javax.xml.transform.Source, and it wouldn't be difficult to enhance JBossXB to do the same. This would also be more robust because it would eliminate the xml escape processing that we duplicate from a standard XML parser (see [JBWS-1240] for an example).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 11 months