[JBoss Messaging] - HTTP example not working
by PeterJ
The http example client in 1.0.1.CR4 has a few issues, one which is easily fixed, the others are a bit more difficult.
First, in example/http/build.xml the Ant property jboss.configuration never gets set, so the messaging-http-service.xml file gets copied to the wrong location. To fix this, add the line:
<property name="jboss.configuration" value="messaging"/>
anywhere after the line:
<property file="./do-not-distribute.properties"/>
The other two problems are more difficult to fix. In the class org.jboss.jms.server.remoting.JMSWireFormat, the methods write() and read() contain sanity checks to ensure that the parameters out and in are instances of ObjectOutputStream and ObjectInputStream, respectively. But they are not. Instead, out and in are instances of sun.net.www.http.PosterOutputStream (which extends ByteArrayOutpStream) and sun.net.www.protocol.http.HttpURLConnection$HttpInputStream (which extends FilterInoutStream), respectively. Unfortunately, wrapping these classes within the expected classes doesn't work.
I searched through the forums and JIRA and didn't see anything on this.
I am using JBoss AS 4.0.4.GA with EJB3, JVM 5.0_08.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969290#3969290
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969290
19 years, 7 months
[EJB 3.0] - Re: Detach entities - Obtaining a clear pojo
by fatbatman
I'm aware of why LazyInitilizationException's are thrown, and know I could do something like you demonstrated. My point though is this, as I understand things DTO's are no longer fashionable in EJB3 and entiy classes are POJO's which can be populated, then moved between the application tiers. This works fine unless you need to send the object to remote client, in which case you get the issue mentioned above. You can of course do some kind of manual cloning, but isn't doing such a thing very similar to creating a DTO albeit of the same class?
Or you can create your own custom serialisation/encoding (perhaps using something like XStream as mentioned by Gavin in the URL), but then are the entities really POJO's if you have to do that?
I understand that hibernate needs to add some magic for it to operate, but I'm requesting that there is some kind of method within Hibernate to return a version of the entity (probably a specially constructed instance/clone) with all traces of Hibernate removed.
The "hibernate cleanser" as discussed at http://blog.murf.org/2005/04/06/lazy-loading-and-the-hibernate-cleanser/ proposes a similar thing but I couldn't find any source code.
Does anyone else thing this would be a useful function? or am I missing something?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969283#3969283
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969283
19 years, 7 months