[EJB 3.0] - Locally calling remote interface results in remote invocatio
by bhawthorne
I've come across what looks like a bug in the EJB3 deployed with JBossAS 5.1.0, but I thought I would post here first for some confirmation.
We have a web app which may be deployed in the same container or externally, and thus makes calls to remote EJB interfaces. In the same-container case, I found that the calls were still going through the network stack, and narrowed it down to IsLocalProxyFactoryInterceptor in org.jboss.ejb3.proxy.impl.remoting.
In this class, it seems to use the system time of the class's initialization to determine if the call is local or not. The problem seems to lie in the static initialization, where the singleton instance is constructed _before_ the static 'stamp' variable is initialized. This results in marshalledStamp getting a value of zero, and when later compared to stamp in isLocal(), is always not-equal, and thus is never considered a local call.
I've patched the class by moving the stamp variable initialization to before the singleton init. I'm not clear on the relationship between this singleton and other deserialized instances, or how I might have affected other things, but my fix seems to work for us so far.
I can make a JIRA on this if my analysis here isn't completely off-base :)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236519#4236519
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236519
16 years, 10 months
[JBossWS] - JAXWS handlers
by kj_newbie
Hello,
I am new to JBossWS and my task is to get a given WS work with Handlers. The handlers are responsible for securing the SOAP Request through another API (to be precise - OpenSSO STS API)
I got this to work on Weblogic container and since JAX WS is a standard followed by JBoss also, I would assume, the same handler implementation would work here too (with minor config changes). But, I get the following exception when I run the client.
| 13:32:06,250 ERROR [STDERR] java.lang.IllegalArgumentException: SOAPElement expected
| 13:32:06,250 ERROR [STDERR] at org.jboss.ws.core.soap.SOAPBodyImpl.convertToBodyElement(SOAPBody
| Impl.java:296)
| 13:32:06,250 ERROR [STDERR] at org.jboss.ws.core.soap.SOAPBodyImpl.appendChild(SOAPBodyImpl.java
| :200)
| 13:32:06,250 ERROR [STDERR] at com.sun.identity.wss.sts.TrustAuthorityClient.getTrustResponse(Tr
| ustAuthorityClient.java:566)
| 13:32:06,250 ERROR [STDERR] at com.sun.identity.wss.sts.TrustAuthorityClient.getSTSToken(TrustAu
| thorityClient.java:540)
| 13:32:06,250 ERROR [STDERR] at com.sun.identity.wss.sts.TrustAuthorityClient.getSecurityToken(Tr
| ustAuthorityClient.java:280)
| 13:32:06,250 ERROR [STDERR] at com.sun.identity.wss.sts.TrustAuthorityClient.getSecurityToken(Tr
| ustAuthorityClient.java:108)
| 13:32:06,312 ERROR [STDERR] at com.sun.identity.wss.security.handler.SOAPRequestHandler.secureRe
| quest(SOAPRequestHandler.java:607)
| 13:32:06,312 ERROR [STDERR] at com.sun.samples.ClientHandler.handleMessage(ClientHandler.java:70
| )
| 13:32:06,312 ERROR [STDERR] at com.sun.samples.ClientHandler.handleMessage(ClientHandler.java:1)
|
| 13:32:06,312 ERROR [STDERR] at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessag
| e(HandlerChainExecutor.java:305)
|
I am not sure what's causing this exception so for debugging, I start with the handler config files for JBoss. The handler on the client side looks like the following. Does it look right or am I missing something here?
| <bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| wsdlLocation="http://localhost:8080/StockQuoteImpl?WSDL"
| xmlns="http://java.sun.com/xml/ns/jaxws">
| <bindings node="wsdl:definitions"
| xmlns:jws="http://java.sun.com/xml/ns/javaee">
| <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
| <handler-chain>
| <handler>
| <handler-class>com.sun.samples.ClientHandler</handler-class>
| </handler>
| </handler-chain>
| </handler-chains>
| </bindings>
| </bindings>
On the server side it is as follows:
| <?xml version="1.0" encoding="UTF-8"?>
| <handler-config>
| <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
| <handler-chain>
| <handler-chain-name>SimpleChain</handler-chain-name>
| <handler>
| <handler-name>handler1</handler-name>
| <handler-class>com.sun.samples.ServerHandler</handler-class>
| </handler>
| </handler-chain>
| </handler-chains>
| </handler-config>
|
Any insights/useful hints will be greatly appreciated.
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236512#4236512
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236512
16 years, 10 months
[Remoting] - Re: javax.jms.JMSException: Failure on underlying remoting c
by KrisFra
Oops, how about this ...
<server>
|
| <!-- Standard bisocket connector - the bisocket transport only opens connection from client->server
| so can be used with firewalls where only outgoing connections are allowed.
| For examples of HTTP and SSL transports see docs/examples -->
| <mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.messaging:service=Connector,transport=bisocket"
| display-name="Bisocket Transport Connector">
| <attribute name="Configuration">
| <config>
| <invoker transport="bisocket">
|
| <!-- There should be no reason to change these parameters - warning!
| Changing them may stop JBoss Messaging working correctly -->
| <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
| <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
| <attribute name="dataType" isParam="true">jms</attribute>
| <attribute name="socket.check_connection" isParam="true">false</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">4457</attribute>
| <attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
| <attribute name="serverSocketClass">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
|
| <attribute name="numberOfCallRetries" isParam="true">1</attribute>
| <attribute name="pingFrequency" isParam="true">214748364</attribute>
| <attribute name="pingWindowFactor" isParam="true">10</attribute>
| <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>
| <!-- End immutable parameters -->
|
| <attribute name="stopLeaseOnFailure" isParam="true">true</attribute>
|
| <!-- Periodicity of client pings. Server window by default is twice this figure -->
| <!-- <attribute name="clientLeasePeriod" isParam="true">10000</attribute> -->
| <attribute name="clientLeasePeriod" isParam="true">3600000</attribute>
|
|
| <!-- added by KMF -->
| <attribute name="validatorPingPeriod" isParam="true">10000</attribute>
| <attribute name="validatorPingTimeout" isParam="true">5000</attribute>
| <attribute name="registerCallbackListener">false</attribute>
|
|
| <attribute name="timeout" isParam="true">0</attribute>
|
| <!-- Number of seconds to wait for a connection in the client pool to become free -->
| <attribute name="numberOfRetries" isParam="true">10</attribute>
|
| <!-- Max Number of connections in client pool. This should be significantly higher than
| the max number of sessions/consumers you expect -->
| <attribute name="JBM_clientMaxPoolSize" isParam="true">200</attribute>
|
| <!-- The maximum time to wait before timing out on trying to write a message to socket for delivery -->
| <attribute name="callbackTimeout">10000</attribute>
|
| <!-- Use these parameters to specify values for binding and connecting control connections to
| work with your firewall/NAT configuration
| <attribute name="secondaryBindPort">xyz</attribute>
| <attribute name="secondaryConnectPort">abc</attribute>
| -->
|
| </invoker>
| <handlers>
| <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
|
| </server>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236508#4236508
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236508
16 years, 10 months