[EJB/JBoss] - JBoss 4.0.4.GA and 4.2.1.GA EJB interoperability
by gturner
I'm testing whether we can mix JBoss 4.0.4.GA and 4.2.1.GA in our environment while performing upgrades to 132+ hosts!
We have an old EJB 2.1 Session Bean that works fine if the EJB is deployed on a 4.0.4.GA server and accesses by a client on 4.2.1.GA, however if we deploy the EJB on 4.2.1.GA and test whether a client on 4.0.4.GA can access the EJB, Home->create fails and the following stacktraces occur:
Client exception (on 4.0.4.GA):
| 2007-10-16 15:07:29,846 ERROR [org.jboss.remoting.transport.socket.SocketClientInvoker] (http-0.0.0.0-8080-2:) Got marshalling exception, exiting
| java.io.OptionalDataException
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at org.jboss.invocation.unified.marshall.InvocationUnMarshaller.read(InvocationUnMarshaller.java:48)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:175)
| at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:331)
| at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:63)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy287.create(Unknown Source)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.xo.nextgen.connector.ejb.SessionBeanConnection.getRemote(SessionBeanConnection.java:62)
|
Server exception (4.2.1.GA):
| 2007-10-16 15:07:29,843 ERROR [org.jboss.remoting.transport.socket.ServerThread] (WorkerThread#0[10.88.24.173:36532]:) Worker thread initialization failure java.io.EOFException
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:526)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
|
Is there some work-around to get these two versions of JBoss to interoperate?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096240#4096240
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096240
18Â years, 9Â months
[JBossWS] - @PostConstruct never invoked
by gturner
I have a JAX-WS 2.0 RI based project deployed on JBoss 4.0.4.GA that I am upgrading to JBoss 4.2.1.GA with JBossWS 2.0.1.GA.
An endpoint packaged in a war makes use of @PostConstruct, as well as some Handlers that make use of @PostConstruct as well. @PostContruct on the web service class is never invoked, however @PostConstruct on on of the Handlers does get invoked. I'll try experimenting with removing the handlers, and see if it's something like JBossWS will only invoker one @PostConstruct method per web service.
The following port interface was generated from the WSDL:
| @WebService(name="ImportPort", targetNamespace="urn:HVODWebService")
| @HandlerChain(file="ImportPort_handler.xml")
| @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
| public interface ImportPort {
|
| @WebMethod
| @WebResult(name="ImportResponse",
| targetNamespace="urn:HVODWebServiceTypes",
| partName="response")
| public ImportResponse submitJob(@WebParam(name="ImportRequest",
| targetNamespace="urn:HVODWebServiceTypes",
| partName="request")
| ImportRequest request)
| throws ServiceFault;
|
| }
|
The following implementation makes use of @PostConstruct, but never gets invoked:
| @WebService(endpointInterface="com.xo.nextgen.hvodwebservice.wsdl.ImportPort")
| public class ImportWebService implements ImportPort {
|
| @Resource
| private WebServiceContext context;
|
| @PostConstruct
| public void initialize() {
| ...
| }
|
| @PreDestroy
| public void destroy() {
| ...
| }
|
| public ImportResponse submitJob(ImportRequest request)
| throws ServiceFault {
| ...
| }
|
| }
|
The following handler.xml is used to inject two Handlers:
| <?xml version="1.0" encoding="UTF-8"?>
| <javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
| <javaee:handler-chain>
| <javaee:handler>
| <javaee:handler-name>SchemaValidation</javaee:handler-name>
| <javaee:handler-class>com.xo.nextgen.hvodwebservice.wsdl.handler.SchemaValidationHandler</javaee:handler-class>
| </javaee:handler>
| <javaee:handler>
| <javaee:handler-name>FaultNotification</javaee:handler-name>
| <javaee:handler-class>com.xo.nextgen.hvodwebservice.wsdl.handler.FaultNotificationHandler</javaee:handler-class>
| </javaee:handler>
| </javaee:handler-chain>
| </javaee:handler-chains>
|
The following Handler interestingly does have it @PostConstruct method invoked:
| public class SchemaValidationHandler
| implements LogicalHandler<LogicalMessageContext> {
|
| @PostConstruct
| public void initialize() throws WebServiceException {
| ...
| }
|
| @PreDestroy
| public void destroy() {
| }
|
|
| public boolean handleMessage(LogicalMessageContext context) {
| ...
| }
|
| public boolean handleFault(LogicalMessageContext context) {
| ...
| }
|
| public void close(MessageContext context) {
| ...
| }
|
| }
|
Also the exact same behavior occurs with JBoss 4.2.1.GA with it's native JBossWS 1.2.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096238#4096238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096238
18Â years, 9Â months
[JBoss Seam] - h:selectManyCheckbox for ManyToMany relationship
by yuriy_zubarev
Hello,
Here is my entity model:
| Module
| |-- name
| Permission
| |-- Module
| |-- name
| Role
| |-- Permissions
| |-- name
|
When I want to provide a front-end to edit Role information I do something like this and everything works:
| <h:form>
| <h:inputText value="#{role.name}"/>
|
| <h:selectManyCheckbox value="#{role.permissions}">
| <s:selectItems value="#{permissions}" var="p" label="#{p.name}"/>
| <s:convertEntity/>
| </h:selectManyCheckbox>
|
| <h:commandLink action="#{roleHome.persist}" value="Save"/>
| </h:form>
|
The problem here is that all check boxes for permissions are grouped together. If you look at the entity model you will see that each permission belongs to a module. So I wanted to show check boxes grouped by module name. I tried something like this but it didn't work:
| <h:form>
| <h:inputText value="#{role.name}"/>
|
| <h:dataTable value="#{modules.resultList}" var="m">
| <h:column>
| #{m.name}
|
| <h:selectManyCheckbox value="#{role.permissions}">
| <s:selectItems value="#{m.permissions}" var="p" label="#{p.name}"/>
| <s:convertEntity/>
| </h:selectManyCheckbox>
| </h:column>
| </h:dataTable>
|
| <h:commandLink action="#{roleHome.persist}" value="Save"/>
| </h:form>
|
The page looks exactly as I wanted it to. It's just the state of check boxes doesn't get persisted. I guess it's because "name" element of HTML check box also gets a portion of it from h:dataTable.
Any suggestions?
Thank you,
Yuriy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096232#4096232
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096232
18Â years, 9Â months