Ian,
Thank you. I will look into this further.
eve
> Date: Thu, 2 Oct 2008 14:06:29 -0700> From: Ian.Evans_at_Sun.COM> To: ejb_at_glassfish.dev.java.net> CC: persistence_at_glassfish.dev.java.net> Subject: Re: injections> > Eve Pokua wrote:> > I followed your advice and created a whole new application. Took a copy > > of the tutorial client:> > > > package newapplication;> > import javax.ejb.EJB;> > import machinedetails2.*;> > /**> > *> > * @author Administrator> > */> > public class Main {> > > > @EJB> > private static UsersRemote usersRemote;> > public Main(String[] args) {> > }> > /**> > * @param args the command line arguments> > */> > public static void main(String[] args) {> > Main client = new Main(args);> > client.doTest();> > }> > > > public void doTest() {> > try {> > usersRemote.createUser("t7","testing7","null","null");> > System.out.println("successfull");> > > > } catch (Exception ex) {> > System.err.println("Caught a Exception: not working ");> > > > ex.printStackTrace();> > //System.exit(0);> > }> > }> > }> > > > > > > > amended it, tested it on my application and for the first time in> > a hundred years it works. > > > > So, sorry everyone, it was all my mistake trying to mix swing user interface> > with JEE 5 injection. I also took a look at the dukesbank application > > and got> > confuse with the BankAdmin.java swing application. Thought I could do it. > > You can use injection in Swing apps provided the application is run via > the application client container (appclient in GlassFish). It's possible > that problem you had with your original Swing app was your use of an > injected resource in your nested class. Or you may not have instantiated > the inner class before calling actionPerformed().> > In general, it's easier to test your server application with a simple > console test client, as you did above, before coding the GUI application.> > > Thanking you all for your patience and excuse me if I offended anyone.> > No offense at all. Glad you got through one tough patch to getting your > app running.> > -ian> -- > Ian Evans> ian dot evans at sun dot com> Java EE technical documentation> > ---------------------------------------------------------------------> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net>
_________________________________________________________________
Make a mini you and download it into Windows Live Messenger
http://clk.atdmt.com/UKM/go/111354029/direct/01/