User: gropi   
  Date: 01/04/24 08:17:17

  Modified:    src/docs jbossintro.xml
  Log:
  A code snippet in the manual was out of sync with the archives which
  included the example sources. Thanks to Jason Yip for the correction.
  
  Revision  Changes    Path
  1.14      +13 -12    manual/src/docs/jbossintro.xml
  
  Index: jbossintro.xml
  ===================================================================
  RCS file: /cvsroot/jboss/manual/src/docs/jbossintro.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jbossintro.xml    2001/04/20 04:23:36     1.13
  +++ jbossintro.xml    2001/04/24 15:17:17     1.14
  @@ -455,7 +455,8 @@
                <para>Here is the test client:</para>
                <figure>
                        <title>Test client, file name InterestClient.java</title>
  -                     <programlisting>import java.util.Properties;
  +                     <programlisting>
  +import java.util.Properties;
   import javax.rmi.PortableRemoteObject; 
   import javax.naming.*;
   
  @@ -481,7 +482,7 @@
      {
         // Set up the naming provider; this may not always be necessary, depending
         // on how your Java system is configured.
  -      Hashtable env = new Hashtable();
  +      Properties env = new Properties();
         env.setProperty("java.naming.factory.initial",  
"org.jnp.interfaces.NamingContextFactory");
         env.setProperty("java.naming.provider.url",  "localhost:1099");
         env.setProperty("java.naming.factory.url.pkgs",  "org.jboss.naming");
  @@ -492,17 +493,17 @@
         try
         {
            // Get a naming context
  -            InitialContext jndiContext = new InitialContext(env);
  +         InitialContext jndiContext = new InitialContext(env);
            System.out.println("Got context");
  -
  -         // Get a reference to the Interest Bean
  -         Object ref  = jndiContext.lookup("interest/Interest");
  -         System.out.println("Got reference");
  -
  -         // Get a reference from this to the Bean's Home interface
  -         InterestHome home = (InterestHome) 
  -            PortableRemoteObject.narrow (ref, InterestHome.class);
  -
  +      
  +      // Get a reference to the Interest Bean
  +      Object ref  = jndiContext.lookup("interest/Interest");
  +      System.out.println("Got reference");
  +      
  +      // Get a reference from this to the Bean's Home interface
  +      InterestHome home = (InterestHome) 
  +      PortableRemoteObject.narrow (ref, InterestHome.class);
  +         
            // Create an Interest object from the Home interface
            Interest interest = home.create();
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to