Skip to main content

ORB - IIOP Message body size

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
boernd
Offline
Joined: 2011-11-08

Hi,

we have an application where the frontend layer makes EJB calls to the backend. Analysis of performance problems showed that the message body size of IIOP messages is quite huge. The strange thing is that every message also includes data of all the codebase contexts (which is a lot), e.g. (obfuscated our code):

GIOP Message Body

Total length (ByteBuffer position) : 26740
Byte Buffer capacity : 26740

47 49 4f 50 01 02 00 00 00 00 68 68 00 00 00 66 GIOP......hh...f
03 00 00 00 00 00 00 00 00 00 00 a5 af ab cb 00 ...........ᆬᆵᆱï¿.
00 00 00 26 00 00 00 64 00 00 00 09 53 31 41 53 ...&...d....S1AS
2d 4f 52 42 00 00 00 00 00 00 00 03 00 00 00 08 -ORB............
52 6f 6f 74 50 4f 41 00 00 00 00 0a 23 52 46 4d RootPOA.....#RFM
42 61 73 65 23 00 00 00 00 00 00 4f 38 39 36 30 Base#......O8960
33 35 37 32 33 33 34 37 38 39 30 34 35 5f 52 42 3572334789045_RB
75 73 69 6e 65 73 73 5f 63 6f 6d 2e 69 6e 66 6f usiness_com.---
6e 6f 76 61 2e 6e 65 77 73 66 6c 61 73 68 2e 5f ---
4e 65 77 73 66 6c 61 73 68 5f 52 65 6d 6f 74 65 ---
2d 45 4a 42 4f 62 6a 65 63 74 00 00 00 00 00 10 -EJBObject......
01 3e 55 f9 6b 9f 01 b5 00 00 00 04 00 00 00 01 .>U.kï¾.ï¾µ........
14 00 00 00 00 00 00 15 67 65 74 41 6c 6c 41 63 ........someMethod
74 69 76 65 4d 65 73 73 61 67 65 73 00 00 00 00 ---....
00 00 00 05 00 00 00 11 00 00 00 02 00 02 00 00 ................
00 00 00 01 00 00 00 0c 00 00 00 00 00 01 00 01 ................
00 01 01 09 4e 45 4f 00 00 00 00 02 00 14 00 00 ....NEO.........
53 55 4e 01 00 00 00 29 31 30 2e 31 2e 33 30 2e SUN....)---
31 39 37 3a 3a 3a 2d 31 32 34 64 62 66 37 38 3a ---:::-124dbf78:
31 33 66 31 33 35 35 66 64 30 66 3a 2d 38 30 30 13f1355fd0f:-800
30 00 00 00 00 00 00 0f 00 00 00 20 00 00 00 00 0...............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 ................
7f ff ff 03 00 00 63 fb 66 69 6c 65 3a 2f 6f 70 ......c.file:/op
74 2f 61 70 70 2f 67 6c 61 73 73 66 69 73 68 2d t/app/glassfish-
33 2e 31 2e 32 2e 32 2f 67 6c 61 73 73 66 69 73 3.1.2.2/glassfis
68 2f 6e 6f 64 65 73 2f 6c 6f 63 61 6c 68 6f 73 h/nodes/localhos
74 2d 72 36 64 61 69 6c 79 2d 63 6c 75 73 74 65 t-cluste
72 2f 72 36 64 61 69 6c 79 2d 66 72 6f 6e 74 65 r/fronte
6e 64 2d 69 6e 73 74 61 6e 63 65 31 2f 61 70 70 nd-instance1/app
6c 69 63 61 74 69 6f 6e 73 2f 77 65 62 61 63 2d lications/...
76 73 6f 30 31 2f 57 45 42 2d 49 4e 46 2f 6c 69 /WEB-INF/li
62 2f 74 72 61 6e 73 61 63 74 69 6f 6e 73 2d 33 b/transactions-3
2e 38 2e 30 2e 6a 61 72 20 66 69 6c 65 3a 2f 6f .8.0.jar.file:/o
70 74 2f 61 70 70 2f 67 6c 61 73 73 66 69 73 68 pt/app/glassfish
2d 33 2e 31 2e 32 2e 32 2f 67 6c 61 73 73 66 69 -3.1.2.2/glassfi
73 68 2f 6e 6f 64 65 73 2f 6c 6f 63 61 6c 68 6f sh/nodes/localho
73 74 2d 72 36 64 61 69 6c 79 2d 63 6c 75 73 74 st-clust
65 72 2f 72 36 64 61 69 6c 79 2d 66 72 6f 6e 74 er/front
65 6e 64 2d 69 6e 73 74 61 6e 63 65 31 2f 61 70 end-instance1/ap
70 6c 69 63 61 74 69 6f 6e 73 2f 77 65 62 61 63 plications/
2d 76 73 6f 30 31 2f 57 45 42 2d 49 4e 46 2f 6c ---/WEB-INF/l
69 62 2f 6a 61 63 6b 73 6f 6e 2d 78 63 2d 31 2e ib/jackson-xc-1.
39 2e 32 2e 6a 61 72 20 66 69 6c 65 3a 2f 6f 70 9.2.jar.file:/op
74 2f 61 70 70 2f 67 6c 61 73 73 66 69 73 68 2d t/app/glassfish-
...
and so on.

The only reason the body gets this large is because of all the codebase contexts. Is there a way to get rid of this information (e.g. via JVM property)?

Regards
Bernd

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
boernd
Offline
Joined: 2011-11-08

For those interested, the following changes work for us:

- Extend RMIClassLoaderSpi and overwrite getClassAnnotation to return null.
- Package the code into a jar file and put it in glassfish3/glassfish/modules/endorsed.
- Add the JVM parameter -Djava.rmi.server.RMIClassLoaderSpi=fully.qualified.Classname

Results:
- Huge reduction of message body size (e.g. 2k vs. 32k)
- Load tests showed up to 30% better response times.

Regards
Bernd