[JBossCache] - Re: Hibernate/Cache conceptual mismatch
by otaylor
Manik: I think using a separate method is likely a cleaner approach. I do want to note
here that a separate method by itself can't solve the correctness issues I noted
in my comment of Sep. 18th, at least for the pessimistic case, since basically the
cache has no way of knowing whether the put() or the update() is providing newer
information. In the optimstic case with explicit versioning, the situation is better.
Scott: Are you wondering if we can get a "dirty read" if we call putFromExternalRead()
the transaction suspended? The assumption here is that the caller of
putFromExternalRead() only calls the method with data that was committed to the
database before the start of the outer transaction, and not with data that was updated
in the outer transaction. Hibernate, for example, makes that guarantee except in
the most exotic situations. (You might be able to fool it if you tried hard.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977555#3977555
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977555
19 years, 7 months
[JBossWS] - How to create Cutom SoapException
by kapil.singhal
Hello,
I am creating a Web Service using JBossWS.
I want to customize the contents of SOAP Exception, which I want to throw from my Web Service.
For this, I am using SOAPFaultException to create my own exception classes. But I am not able to fill the detail in the Detail attribute of the SOAPFaultException.
I am filling the specifics of JBossWS using the "org.jboss.ws.soap.SOAPFactoryImpl". But on the client side when I run my RMI Client, I found that one of the element is not Serializable. (Please find the stack below.)
Can you suggest me how to fill these so that I can throw a customized SoapFault exception at the client end ?
Any help will be appreciated.
Kapil
19:05:14,091 ERROR [ServerThread] failed
java.io.NotSerializableException: org.jboss.ws.soap.DetailImpl
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.access$100(ObjectOutputStream.java:139)
at java.io.ObjectOutputStream$PutFieldImpl.writeFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeFields(ObjectOutputStream.java:429)
at javax.xml.rpc.soap.SOAPFaultException.writeObject(SOAPFaultException.java:145)
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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
at java.lang.Throwable.writeObject(Throwable.java:649)
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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:81)
at org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:84)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:381)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977553#3977553
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977553
19 years, 7 months