Chris Vaughan wrote: > > I've searched the mailing list archive, and I'm surprised to find nobody > else has reported this. > > When I run newbean, I get the following error: > cat: /home/chris/jonas/jonas_jdk1.2/bin/template/Client.java: No such file or >directory > > My $JONAS_ROOT is set correctly, and all the other files exist in > $JONAS_ROOT/bin/template, but Client.java seems to be missing. > > In fact, running find on $JONAS_ROOT doesn't find that file > anywhere. This is with jonas2.tgz package, but the file also is missing > from jonas_src.tgz as well as jonas_jdk1.1.tar.gz. > > Am I missing something? The newbean script clearly refers to this > file? Should I check out the CVS source and see if it is there? > Hi Chris, You are right, we have missed to submit this file. You can find it in attached file we are sorry for that Best regards, -- Philippe Philippe Coq BullSoft Phone: (33) 04 76 29 78 49 Bull S.A - 1 rue de Provence - 38432 Echirolles Cedex France [EMAIL PROTECTED] http://www-frec.bull.com Download our EJBServer at http://www.bullsoft.com/ejb
// @[EMAIL PROTECTED] // mini Client for accessing bean @BNAME@ package @PACKAGE@; import java.rmi.RemoteException; import java.util.Enumeration; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; /** * */ public class @BNAME@Client { static Context initialContext = null; static @BNAME@Home home = null; public static void main(String[] arg) { // Get InitialContext try { initialContext = new InitialContext(); } catch (NamingException e) { e.printStackTrace(); System.exit(2); } // Lookup bean home String beanName = "@BNAME@Home"; try { home = (@BNAME@Home) initialContext.lookup(beanName); } catch(Exception e) { e.printStackTrace(); System.exit(2); } // ... } }