Implementing the Server in Java (cont’d)
Hello_impl p = new Hello_impl();
String ref = orb.object_to_string(p);
PrintWriter out = new PrintWriter(new FileOutputStream(“Hello.ref”));
Create an implementation object
- No “smart-pointer”, built-in Java garbage handles memory usage
Save a “stringified” object reference
- Creates “stringified” reference
- Saves to a file