1 // If this server is compiled and run with the JDK ORB, it will
2 // fragment the GIOP Messages sent when get_big_reply() is called.
4 import org
.omg
.CORBA
.*;
5 import org
.omg
.PortableServer
.*;
6 import Test
.Big_ReplyPOA
;
8 class Big_ReplyImpl
extends Big_ReplyPOA
10 private org
.omg
.CORBA
.ORB orb_
;
12 public byte[] get_big_reply () {
13 byte [] seq
= new byte [1000000];
14 for (int i
= 0; i
< seq
.length
; i
++)
19 public void setORB (org
.omg
.CORBA
.ORB orb_val
) {
26 public void shutdown () {
27 orb_
.shutdown (false);
34 public static void main (String args
[]) {
36 ORB orb
= ORB
.init (args
, null);
37 POA poa
= org
.omg
.PortableServer
.POAHelper
.narrow (
38 orb
.resolve_initial_references ("RootPOA"));
40 Big_ReplyImpl servant
= new Big_ReplyImpl ();
42 poa
.activate_object (servant
);
44 String filename
= new String ("server.ior");
45 String ior
= orb
.object_to_string (servant
._this ());
46 java
.io
.FileWriter file
= new java
.io
.FileWriter (filename
);
51 poa
.the_POAManager ().activate ();
52 System
.out
.println ("Ready...");
56 System
.err
.println ("ERROR: " + e
);
57 e
.printStackTrace (System
.out
);