1 // If this server is compiled and run with the JDK ORB, it will
2 // fragment the GIOP Messages sent when more_data() is called.
4 import java
.io
.FileReader
;
5 import java
.io
.BufferedReader
;
6 import org
.omg
.CORBA
.*;
7 import org
.omg
.PortableServer
.*;
8 import Test
.Payload_Receiver
;
9 import Test
.Payload_ReceiverHelper
;
13 public static void main (String args
[]) {
15 ORB orb
= ORB
.init (args
, null);
17 // Get the object reference
18 BufferedReader reader
= new BufferedReader (
19 new FileReader ("server.ior"));
20 StringBuffer ior
= new StringBuffer();
22 while ((line
= reader
.readLine()) != null) {
26 org
.omg
.CORBA
.Object obj
= orb
.string_to_object (ior
.toString ());
27 Payload_Receiver receiver
= Payload_ReceiverHelper
.narrow (obj
);
30 byte [] seq
= new byte [1000000];
31 for (int i
= 0; i
< seq
.length
; ++i
)
34 // Invoke the method on the server
35 for (int i
= 0; i
< 20; ++i
)
36 receiver
.more_data (seq
);
41 System
.err
.println ("ERROR: " + e
);
42 e
.printStackTrace (System
.out
);