Bugs item #789318, was opened at 2003-08-15 10:56
Message generated for change (Settings changed) made by osganian
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=789318&group_id=22866

Category: JBossMX
Group: v3.2
Status: Open
Resolution: None
>Priority: 7
Submitted By: Mike Osganian (osganian)
Assigned to: Nobody/Anonymous (nobody)
Summary: ObjectMessage.getObject() doesn't work in JBoss 3.2.1

Initial Comment:
Attached is a zip file containing a simple example of the 
problem.  The problem is simple.  I have an object that i 
wrap in an ObjectMessage and send that message to a 
JMS queue.  My message driven bean receives this 
message and tests to see what type of object the 
wrapped object is.  In a simple case (the wrapped 
object just implements java.io.Serializable) it works.  But 
when the wrapped object extends an Object that 
extends java.util.EventObject (which implements 
java.io.Serializable) the Message Driven bean doesn't 
determine the type of the wrapped object correctly.  
Even if I explicitly define Object2 and/or Object3 as 
implementing java.io.Serializable it still doesn't work.

The attached zip file shows the problem.  I am wrapping 
up a message of type Object1 and Object3.  When the 
message driven bean recieves theses messages it sees 
Object1 as Object1 but it sees Object3 as Object2 EVEN 
through the classname is Object3.

OS: Windows XP
JDK version: 1.4.2
JBoss version: 3.2.1 (with Tomcat 4.1.24)

Console Output (server.log is also bundled in the 
attached zip file):

...
11:28:22,019 INFO  [Server] JBoss (MX MicroKernel) 
[3.2.1 (build: CVSTag=JBoss_3
_2_1 date=200305041533)] Started in 21s:389ms
10:16:28,995 WARN  [ClassLoadingTask] Duplicate class 
found: bug.Object3
Current CS: (file:/C:/jboss-
3.2.1/server/default/tmp/deploy/server/default/deploy/bu
g.jar/44.bug.jar <no certificates>)
Duplicate CS: (file:/C:/jboss-
3.2.1/server/default/deploy/bug.jar <no certificates>)
11:29:23,542 INFO  [STDOUT] .
11:29:23,552 INFO  [STDOUT] Instance of OBJECT 2: 
Object #3
11:29:23,552 INFO  [STDOUT] Classes Equal: false
11:29:23,552 INFO  [STDOUT] OBJECT CLASS: 'class 
bug.Object3'
11:29:23,552 INFO  [STDOUT] OBJECT CLASS 
NAME: 'bug.Object3'
11:29:23,552 INFO  [STDOUT] OBJECT's SUPER: 'class 
bug.Object2'
11:29:23,502 INFO  [STDOUT] .
11:29:23,512 INFO  [STDOUT] Instance of OBJECT 1: 
Object #1
11:29:23,512 INFO  [STDOUT] Classes Equal: true
11:29:23,522 INFO  [STDOUT] OBJECT CLASS: 'class 
bug.Object1'
11:29:23,522 INFO  [STDOUT] OBJECT CLASS 
NAME: 'bug.Object1'
11:29:23,522 INFO  [STDOUT] OBJECT's SUPER: 'class 
java.util.EventObject'

To run the test is simple.  I provided a build script and a 
run script.  You might need to update some paths to 
your jboss deploy directory so the scripts will work.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=789318&group_id=22866


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to