Performance Monitoring Tools

2002-03-12 Thread Cugier (extern)

Hello,

we are planning to perform some load tests against our application (Servlet,
JSP and EJBs). We have found some tools that will create the load on the
server and will monitor the response times. But we haven't found anything
that can be used to monitor Orion's behaviour during the test. What we want
to monitor is the memory consumption, CPU usage, Sessions etc. 
What is important is that we can record what we monitor so we will be able
to look at the resutls of the test later.

Does anyone has a recommendation for a tool that we can use?

Thanks

Peter




Performance declines after moving to a faster Server

2002-03-07 Thread Cugier (extern)

Hi, 

we are running a simple web applications - just servlets - on an older
Windows NT Server with two Pentium two 233 MHz CPUs. The performance on the
server was acceptable and pages showed up pretty quickly in the browsers. 

Now we bought a new server (still Windows NT) with two Pentium III Xeon 8xx
MHz CPUs (same amount of memory) and moved the application to the new
server. We expected that the performance would increase because of the
faster CPUs but the opposite happened. Our first tests showed a dramatic
increase of response time. Pages that showed up in just one or two seconds
on the old server, now take ten and more seconds to show up. 

We start Orion with the same java runtime parameters as on the old server.
Also the configuration of the Apache server that we use a front end to Orion
did not change. 

Does anyone have an idea how this performance decline is possible? Shouldn't
it be faster on fastes CPUs?








RE: Error Accessing an EJB through a Bean

2001-10-11 Thread Cugier (extern)

We got it to work, thanks to the help of Simon Knott and Lachezar Dobrev.
The reason was that the class file of the EJB was in multiple archive files.
Simon also added a - in my opinion - good explanation why it didn't work to
his reply. I will post here now with his permission, as he replied directly
to me. 

Simon wrote:
> If this is the case [having the class in multiple archives], then what is
likely to be happening is the following:
>
> 1) JSP class loader loads the EJB class into memory, from the WAR file.
> 2) JSP does a lookup for the EJB object.
> 3) EJB container class loader loads the EJB class into memory, from the
JAR
>file.
> 4) EJB container returns its loaded class to the JSP
> 5) Class cast exception is thrown.
> 
> Now the key point here is that different class loaders are used for both
the
> JSP and the EJB container.  When one class is loaded by two different
class
> loaders, they are essentially different classes, with different class
> signatures.
>
> What happens with the class loader is that it takes the quickest route to
> loading a class - in the case of the JSP it will get it from the WAR, in
the
> case of the EJB container it will get it from the JAR.  What you really
need
> to do is to create one archive, which is then placed in either the
> webapp/lib directory or the orion/lib directory, and exclude the EJB
classes
> from the WAR and JAR files.  This means that the classes in this one
central
> JAR file will only be loaded by one class loader, removing the problem.
>
> This does not occur on the standalone client, because it uses only the
> system class loader, no others.


Peter

-Original Message-
From: Lachezar Dobrev [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 11. Oktober 2001 12:37
To: Orion-Interest
Subject: Re: Error Accessing an EJB through a Bean


   Hello.
   INLINE.

> We created a Bean to access an EJB from JSPs. First we tested the Bean
from
> a Java Client and everything worked fine. Then we copied the Bean to the
> Orion server and tried to acces the EJB by using a JSP that instanciates
the
> Bean that accesses the EJB. But we can not get it to work. The test with
the
> Java client still works properly. But using the Bean from JSP always
creates
> a ClassCastException.
>
> Here's the sniplet from the Bean where the lookup is performed.
>
> private static GUIServiceSBHome getHome(){
> GUIServiceSBHome toReturn = null;
> try
> {

   This part with the Hashtable is not correct.
   You should avoid it. Better create a jndi.properties file in the root
directory of your JAR, or the root rirectory of your classes.
   then just use "new InitialContext()" which will get the required
properties from the jndi.properties file.

>   Hashtable env = new Hashtable();
>
>   //ToDO if this bean runs inside a container this Env property will
not be
>   //necessary
>   env.put(Context.INITIAL_CONTEXT_FACTORY,
> "com.evermind.server.rmi.RMIInitialContextFactory");
>   env.put(Context.SECURITY_PRINCIPAL, "admin");
>
>   env.put(Context.SECURITY_CREDENTIALS, "xyz");
>   env.put(Context.PROVIDER_URL,
> "ormi://164.139.33.191:23791/bizDataNew");



   Let's see.

>   // Replace  below with the EJB module name
identified
>   // in your deployment profile

   As said... Especialy in a web-bean use "new InitialContext()"

>   Context ctx = new InitialContext(env);
>   Object ref = ctx.lookup("GUIServiceSB");
>   logger.debug("> > > > > >>>   Got an Object.. Class = " +
> ref.getClass());
>   toReturn = (GUIServiceSBHome)PortableRemoteObject.narrow(ref,
> GUIServiceSBHome.class);
>   logger.debug("> > > > > >>>   Lookup5");
> }
> catch(Throwable ex){
>   logger.error( "Unable to perform lookup for GUIServiceBean Home
> interface\nException = " + ex.toString() );
> }
> return toReturn;
>   }
>
> The logger.debug statements create the following output.
>
> From the Client:
> de.mgi.frontend.GUIServiceProxyBean: > > > > > >>>   Got an Object..
> Class = class __Proxy0
> de.mgi.frontend.GUIServiceProxyBean: > > > > > >>>   Lookup5
>
> On the Server (Bean used by JSP):
> de.mgi.frontend.GUIServiceProxyBean: > > > > > >>>   Got an Object..
> Class = class GUIServiceSBHome_StatelessSessionHomeWrapper215
> de.mgi.frontend.GUIServiceProxyBean: Unable to perform lookup for
> GUIServiceBean Home interface Exception = java.lang.ClassCastException:
> GUIServiceSBHome_StatelessSessionHomeWrapper215 was not an instance of
> interface de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome, the
> interface it implements is
> de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome
>
> Next to the relevant question why does the Bean get an exception when it
is
> executed on the server, there are also two more questions that I have when
I
> look at the ouput.
>
> 1. Why is the return value of ref.getClass() different? The client and the
> JSP are accessing the same

Error Accessing an EJB through a Bean

2001-10-10 Thread Cugier (extern)

We created a Bean to access an EJB from JSPs. First we tested the Bean from
a Java Client and everything worked fine. Then we copied the Bean to the
Orion server and tried to acces the EJB by using a JSP that instanciates the
Bean that accesses the EJB. But we can not get it to work. The test with the
Java client still works properly. But using the Bean from JSP always creates
a ClassCastException.

Here's the sniplet from the Bean where the lookup is performed.

private static GUIServiceSBHome getHome(){
GUIServiceSBHome toReturn = null;
try
{
  Hashtable env = new Hashtable();

  //ToDO if this bean runs inside a container this Env property will not
be 
  //necessary
  env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
  env.put(Context.SECURITY_PRINCIPAL, "admin");

  env.put(Context.SECURITY_CREDENTIALS, "xyz"); 
  env.put(Context.PROVIDER_URL,
"ormi://164.139.33.191:23791/bizDataNew");
   
  // Replace  below with the EJB module name identified
  // in your deployment profile
  Context ctx = new InitialContext(env);
  Object ref = ctx.lookup("GUIServiceSB");
  logger.debug("> > > > > >>>   Got an Object.. Class = " +
ref.getClass());
  toReturn = (GUIServiceSBHome)PortableRemoteObject.narrow(ref,
GUIServiceSBHome.class);
  logger.debug("> > > > > >>>   Lookup5");
}
catch(Throwable ex){
  logger.error( "Unable to perform lookup for GUIServiceBean Home
interface\nException = " + ex.toString() );
}
return toReturn;
  }

The logger.debug statements create the following output.

>From the Client:
de.mgi.frontend.GUIServiceProxyBean: > > > > > >>>   Got an Object..
Class = class __Proxy0
de.mgi.frontend.GUIServiceProxyBean: > > > > > >>>   Lookup5

On the Server (Bean used by JSP):
de.mgi.frontend.GUIServiceProxyBean: > > > > > >>>   Got an Object..
Class = class GUIServiceSBHome_StatelessSessionHomeWrapper215
de.mgi.frontend.GUIServiceProxyBean: Unable to perform lookup for
GUIServiceBean Home interface Exception = java.lang.ClassCastException:
GUIServiceSBHome_StatelessSessionHomeWrapper215 was not an instance of
interface de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome, the
interface it implements is
de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome

Next to the relevant question why does the Bean get an exception when it is
executed on the server, there are also two more questions that I have when I
look at the ouput.

1. Why is the return value of ref.getClass() different? The client and the
JSP are accessing the same EJB on the same Orion server.
2. Why does it says the retrieved object is not an instance of the interface
...GUIServiceSBHome but an instance of ...GUIServiceSBHome? For me the two
interface classe names look the same.

And hint why the bean is not working on the server is greatly appreciated.

Peter Cugier

Database and Web Technology Consulting
Georg-Simon-Ohm-Str. 4, 45701 Herten (GERMANY) 
Phone: +49(0)209 3593777 Fax: +49(0)209 3593766
E-Mail: [EMAIL PROTECTED] 








Console Documentation

2001-09-18 Thread Cugier (extern)

> Hello,
> 
> I looking for some docuemntation about the Orion-Console. It looks like a
> useful grapgical tool to ease the administration of the orion server.
> Unfortunately so far I only found information about how to start the
> console.
> 
> Does anyone know where I can find documentation of what I can do with the
> console and how?
> 
> Thanks!
> 
> Peter
> 
> 




Which JAR do I need to run an external client app

2001-09-18 Thread Cugier (extern)

Hello,

I have the following problem. I created a Java Client application that
accesses an EJB. I start the client with the following batch file.

set
CLASSPATH=H:\oc4j\j2ee\home\ejb.jar;.;H:\oc4j\j2ee\home\orion.jar;H:\oc4j\j2
ee\home\jndi.jar
java HelloClient

where H:\oc4j\j2ee\home ist the directory where I installed the OC4J/Orion
Server on my computer. When I start the client with this batch file
everything works fine.

As I don't want to install OC4J/Orion on each PC where the client should run
I copied the three JAR file that ar listed in the CLASSPATH from
H:\oc4j\j2ee\home to D:\ExtraJARs. I changed the batch file to 

set
CLASSPATH=D:\ExtraJARs\ejb.jar;.;D:\ExtraJARs\orion.jar;D:\ExtraJARs\jndi.ja
r
java HelloClient

After the change I get the following error

javax.naming.NamingException: java:comp/env namespace is only available from
within a J2EE component
at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(../../src/
share/com/sun/enterprise/naming/java/javaURLContext.java:392)
at
com.sun.enterprise.naming.java.javaURLContext.lookup(../../src/share/com/sun
/enterprise/naming/java/javaURLContext.java:51)
at javax.naming.InitialContext.lookup(Unknown Source)
at HelloClient.main(HelloClient.java:9)

Can anyone explain why it works when I use the three JARs from the
H:\oc4j\j2ee\home directory but doesn't work when I try to use the copied
JAR files.

Thanks

Peter