1 package Jt.ejb.examples; 2 3 import Jt.*; 4 import java.io.*; 5 import Jt.ejb.*; 6 7 8 11 public class HelloWorld extends JtObject { 12 13 14 15 17 public static void main(String [] args) { 18 19 JtFactory factory = new JtFactory (); String reply; 21 JtBusinessDelegate main; 22 23 24 27 main = (JtBusinessDelegate) factory.createObject ("Jt.ejb.JtBusinessDelegate", 28 "businessDelegate"); 29 30 31 35 36 main.createObject ("Jt.examples.HelloWorld", "helloWorld"); 37 38 40 main.setValue ("helloWorld", "greetingMessage", "Hello World..."); 41 42 44 main.handleTrace ("main:sending a message (JtHello) to the helloWorld object ..."); 45 reply = (String ) main.sendMessage ("helloWorld", new JtMessage ("JtHello")); 46 47 System.out.println (reply); 49 50 52 main.removeObject ("helloWorld"); 53 54 55 } 56 57 } 58 59 60 61 | Popular Tags |