users@glassfish.java.net

new InitialContext causes delay when starting application client

From: ymajoros <yannick.majoros_at_uclouvain.be>
Date: Fri, 9 May 2008 04:55:47 -0700 (PDT)

Hello,

I have an enterprise app with a standard application client, all running on
a sun java application server 9, which should be the same as GlassFish.

When starting the application, there is some 20 seconds delay before it even
starts the main class.

For some reason, I wrote a standalone client which basically puts some
system properties to kickstart the application client without asking the
server for it. Here is the code of the standalone client if it's useful:

 public static void main(String[] args) {
        try {
            System.setProperty("org.omg.CORBA.ORBInitialHost",
"appservtest1.sipr.ucl.ac.be");
// System.setProperty("org.omg.CORBA.ORBInitialHost",
"localhost");
            System.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
            File tempFile = File.createTempFile("login", ".conf");
            tempFile.deleteOnExit();
            BufferedWriter out = new BufferedWriter(new
FileWriter(tempFile));
            out.write("default {\n" +
                   
"com.sun.enterprise.security.auth.login.ClientPasswordLoginModule required
debug=false;\n" +
                    "};");
            out.close();
            System.setProperty("java.security.auth.login.config",
tempFile.getAbsolutePath());
            DoctoratsClient.main(args);
        } catch (IOException ex) {
           
Logger.getLogger(StandaloneClient.class.getName()).log(Level.SEVERE, null,
ex);
            throw new RuntimeException(ex);
        }
    }

If I run this standalone client with "java -jar ...", it seems to start
without delay.

However, if I run this same standalone client from webstart, there is about
20 sec delay, but only when creating an InitialContext. So, it starts
directly but freezes for some time at that point. Which makes me think the
delay found in my app client is because the webstart stub given by the app
server is doing the InitialContext creation.

Am I right? Is there anything to do? I think this makes glassfish a bad
candidate for app clients :-(
-- 
View this message in context: http://www.nabble.com/new-InitialContext-causes-delay-when-starting-application-client-tp17146419p17146419.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.