You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Patrick Hess <po...@posi.de> on 2005/06/13 11:11:16 UTC
ParanoidCocoonServer / EJB's
Hi,
I have a problem with an existing and deployed Cocoon application based
on 2.1.2 which is using EJB's in a Weblogic 7 server. When we deployed
the application for the first time speed was fine. Now after 1.5 year
users complained about the speed of the application. I checked with "ab"
and found out that even static images took around 3000ms do be delivered
to the client. Cocoon itself wrote into the logs that the request was
handled in something 10-20ms (2nd ...nth request). After 3 days of
searching and comparing with different snapshots of the application I
found that this slowdown was caused by applying Weblogic 7 Service Pack
2. It seems to be related somehow to classpath issues because it works
well with the ParanoidCocoonServlet (without SP / with SP2 / with SP6).
BUT: using the ParanoidCocoonServlet breaks the connection to the EJB,
as soon as I switch to the paranoid servlet they are not accessible for
the Cocoon application (used in Actions).
E.g.
Object homeObject = ctx.lookup ("...");
UserManagerHome userManagerHome = (UserManagerHome)
PortableRemoteObject.narrow (homeObject, UserManagerHome.class);
userManager = userManagerHome.create();
... causes ClassCastException or ClassNotFoundException.
I'm not really good in the details of EJB but I was asking myself if the
paranoid servlet completely "cuts" the connection to app servers
classloader or if this mighty be related to some other misconfiguration
in my setup.
Could somebody tell me if it is possible to use ParanoidCocoonServlet
together with EJB? I guess I'm just missing something in this puzzle...
Maybe EJB's are just packed in wrong way? (EJB + Client JAR??)
Thanks you and have a nice day,
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ParanoidCocoonServer / EJB's
Posted by Geert Josten <Ge...@daidalos.nl>.
Hi,
I'm afraid you will have to copy all relevant jar's into the cocoon's web-inf/lib when using
Paranoid block.
Cheers,
Geert
Patrick Hess wrote:
> Hi,
>
> I have a problem with an existing and deployed Cocoon application based
> on 2.1.2 which is using EJB's in a Weblogic 7 server. When we deployed
> the application for the first time speed was fine. Now after 1.5 year
> users complained about the speed of the application. I checked with "ab"
> and found out that even static images took around 3000ms do be delivered
> to the client. Cocoon itself wrote into the logs that the request was
> handled in something 10-20ms (2nd ...nth request). After 3 days of
> searching and comparing with different snapshots of the application I
> found that this slowdown was caused by applying Weblogic 7 Service Pack
> 2. It seems to be related somehow to classpath issues because it works
> well with the ParanoidCocoonServlet (without SP / with SP2 / with SP6).
>
> BUT: using the ParanoidCocoonServlet breaks the connection to the EJB,
> as soon as I switch to the paranoid servlet they are not accessible for
> the Cocoon application (used in Actions).
>
> E.g.
>
> Object homeObject = ctx.lookup ("...");
> UserManagerHome userManagerHome = (UserManagerHome)
> PortableRemoteObject.narrow (homeObject, UserManagerHome.class);
> userManager = userManagerHome.create();
>
> ... causes ClassCastException or ClassNotFoundException.
>
>
> I'm not really good in the details of EJB but I was asking myself if the
> paranoid servlet completely "cuts" the connection to app servers
> classloader or if this mighty be related to some other misconfiguration
> in my setup.
>
> Could somebody tell me if it is possible to use ParanoidCocoonServlet
> together with EJB? I guess I'm just missing something in this puzzle...
> Maybe EJB's are just packed in wrong way? (EJB + Client JAR??)
>
> Thanks you and have a nice day,
> Patrick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
=====================================
NB: het Daidalos kantoor is sinds 22 april
jl. gevestigd op een nieuw adres:
Daidalos BV
Hoekeindsehof 1 - 4
2665 JZ Bleiswijk
tel: +31 (0)10 850 12 00
fax: +31 (0)10 850 11 99
Bovenstaand adres is tevens het postadres.
======================
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV
http://www.daidalos.nl/
GPG: 1024D/12DEBB50
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ParanoidCocoonServer / EJB's
Posted by Geert Josten <Ge...@daidalos.nl>.
> - as Cocoon doesn't like to be in a .war file create a directory with
> .ear structure, e.g. I used
I expect that Cocoon by itself doesn't mind, but a lot of (default) settings of caching and logging
modules point to files and directories of which Java then expects to find them on the file system.
Application servers like Oracle Application server and the one you mention, probably don't extract
the ear and war file, like servlet engines like Tomcat tend to do. Therefore, the files do not
actually exist but in memory.
I, for myself, killed logging by Cocoon and switched off caching of session and flow variables to
file system (web.xml settings). No problems encountered.
By the way, I had to use the ParanoidCocoonServlet as well, but only because Oracle (9-) has a
crappy XML parser??
Cheers,
Geert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: ParanoidCocoonServer / EJB's
Posted by Patrick Hess <po...@posi.de>.
I solved my own problem now and to document this for the archive here is
what I found out for the combination of Cocoon/Weblogic7/EJB:
- Cocoon needs the use the ParanoidCocoonServlet (web.xml)
- Cocoon and EJB needs to be packed as .ear archive, I've haven't
found another way when using the ParanoidCocoonServlet (otherwise
getting ClassCast-/ClassNotFoundExceptions
- as Cocoon doesn't like to be in a .war file create a directory with
.ear structure, e.g. I used
./mydomain/earapp/
META-INF/application.xml file; ear descriptor
ejbs.jar file; jar with the EJB's
cocoon.war/ directory; cocoon webapp inside
- use the ./mydomain/earapp/ directory when selecting your application
for deployment
And this is my simple descriptor:
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>app-name</display-name>
<module>
<ejb>ejbs.jar</ejb>
</module>
<module>
<web>
<web-uri>cocoon.war</web-uri>
<context-root>cocoon</context-root>
</web>
</module>
</application>
Maybe this helps! Cocoon rocks!!
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org