RE: Cocoon and EJB

2002-11-05 Thread jakob . dalsgaard

On the subject of Cocoon and EJB:

I am developing an application based on JBoss 3.0.3 (with Jetty), Cocoon 2.0.3 and Sun JDK 1.4 - all nicely wrapped up in an InstallAnywhere executable and easy to install on any Linux/Windows box. We are using an almost stock JBoss where the Jetty container is configured to use Servlet 2.3 class loading instead of Java 2 class loading. This way Cocoon gets the Xalan 2.3.1 (actually we just upgraded to 2.4.0 because of weird ArrayIndexOutOfBoundExceptions)  it is shipped with, instead of the Xalan 2.2.D11 coming from JDK 1.4 - anyone seeing the "No More DTM IDs available" exception when running JDK 1.4 should do this, or put xalan-2.3.1+xercesImpl.jar+xml-apis.jar into the JDK endorsed lib.

To get Cocoon running with all that, we've set the "init-classloader" to "true" in the web.xml deployment descriptor.

I am currently looking in to some redirection problems - but otherwise using Jetty as web container is fairly trouble free. We are aiming at being very J2EE spec compliant, but unfortunately we have not yet had the time to deploy the application in other application servers.

And now to the more tedious part: To get the data from the EJB Layer I've created an XSLT that reads an XML definition file of a value object and generates a java file. This java class is the value object, and among other things it knows how to stream itself to a ContentHandler. This XSLT is unfortunately the property of my employer - but the idea is free to use ;-)

We then have Session Facade Beans (see theserverside.com for EJB design patterns) collecting the data we need from Entity Beans (All Container Managed with only local interfaces and a lot of Container Managed Relations - we have the container do a lot of work here) and building the proper domain value objects. We furthermore have Command Session Beans to execute Command Objects that are initialized in the web tier (read: cocoon) and then passed on to the EJB Container; through "Class.forName" we have a Cocoon action that maps 1:1 between Cocoon actions and our commands. All that wraps up to a kinda nice MVC pattern; add in a few JMS messages here and there and the caches are cleared when needed...

Well that was one messy mail I can hopefully do better next time I post ;-)

Jakob Dalsgaard
Udvikler
e-mail:   [EMAIL PROTECTED]
Vesterbrogade 149
1620 København V
Tlf.:   70 25 80 30
Fax.: 70 25 80 31








Piroumian Konstantin <[EMAIL PROTECTED]>
10/25/02 05:15 PM
Please respond to cocoon-users

        
        To:        "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
        cc:        
        Subject:        RE: Cocoon and EJB


> From: Gustavo Nalle Fernandes [mailto:[EMAIL PROTECTED]] 
> 
>  In J2EE world, cocoon would play the role of the 
> presentation tier, same as struts. In some cases, cocoon 
> would bypass EJBs, to provide read-only data-retrieval 
> (faster than instantiate thousands of bean in memory). What 
> about a ValueObject generator, that by reflection generates 
> sax events containing a bean atributes and values, with the 
> option of specifing the "depth" (number of levels of child 
> beans) wanted ?

Value objects can be easily XML-ized using Castor transformer. Take a look
at it in Cocoon scratchpad.
Somebody suggested already this solution and also the JXPath-based
generation or XSP logicsheet generator.

--
  Konstantin

> 
> 
> Gustavo
> 
> 
> -Mensagem original-
> De: Emmanuil Batsis (Manos) [mailto:[EMAIL PROTECTED]] 
> Enviada em: sexta-feira, 25 de outubro de 2002 11:59
> Para: [EMAIL PROTECTED]
> Assunto: Re: Cocoon and EJB
> 
> 
> Martin Schimak wrote:
> 
> > Are there any resources available focusing on EJB and Cocoon?
> 
> The million dollar question. I'm trying to push Cocoon in the 
> company I work for and I keep stumbling upon it.
> 
> Manos
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting.     
> 
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting.     
> 
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

-
Please check that your question  has not already been answered in the
FAQ before posting.     

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>





RE: Cocoon and EJB

2002-10-30 Thread Hunsberger, Peter

>> > Would you mind integrating it into the CocoonWiki
>> > (http://www.outerthought.net)? If no and it's easier for you I can do
it
>> > for you.
>> >
>> > Reinhard,

>> go ahead and add it if you wish; everything in the document is based on
>> stuff from the Cocoon-user archives, with some modifications.  As I said,
>> it's a bit out of date, anyone who is currently attempting this might be
>> able to bring it up to date as they work through it.  Also, I strongly
>> suspect that the section on working with Oracle isn't 100% accurate, but
I
>> haven't spent anytime trying to determine if this is true.
>
> http://outerthought.net/wiki/Wiki.jsp?page=JBossDeployment
> 
> Reinhard

Cool.  

The  tags used for the sample code doesn't wrap (sensibly enough).
Since some of the sample lines are extremely long the result is that the
rest of the content runs off the right hand side of the browser as it flows
to the logical line length.  I guess there are two ways to fix this: 1)
break the sample code in some logical spot, 2) use a CSS rule that causes
the rest of the information to have some sensible right hand boundary
(should be percentage based, but can't be 100% since the left hand menus
take up some room).

This problem seems common across the Cocoon Wiki (at least with IE 6.1) so
solution 2 is probably the best since then all pages using the CSS will
format reasonably without the requirement to manually format every piece of
sample code.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon and EJB

2002-10-30 Thread Reinhard Poetz
> > Would you mind integrating it into the CocoonWiki
> > (http://www.outerthought.net)? If no and it's easier for you I can do it
> > for you.
> >
> > Reinhard,

> go ahead and add it if you wish; everything in the document is based on
> stuff from the Cocoon-user archives, with some modifications.  As I said,
> it's a bit out of date, anyone who is currently attempting this might be
> able to bring it up to date as they work through it.  Also, I strongly
> suspect that the section on working with Oracle isn't 100% accurate, but I
> haven't spent anytime trying to determine if this is true.

http://outerthought.net/wiki/Wiki.jsp?page=JBossDeployment

Reinhard


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon and EJB

2002-10-28 Thread Hunsberger, Peter
> Would you mind integrating it into the CocoonWiki
> (http://www.outerthought.net)? If no and it's easier for you I can do it
for
> you.
> 
Reinhard,

go ahead and add it if you wish; everything in the document is based on
stuff from the Cocoon-user archives, with some modifications.  As I said,
it's a bit out of date, anyone who is currently attempting this might be
able to bring it up to date as they work through it.  Also, I strongly
suspect that the section on working with Oracle isn't 100% accurate, but I
haven't spent anytime trying to determine if this is true.


> -Original Message-
> From: Hunsberger, Peter [mailto:Peter.Hunsberger@;stjude.org]
> Sent: Friday, October 25, 2002 4:59 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Cocoon and EJB
>
>
> > > I have a doubt whether it is possible (and easy :) to
> > > fetch data from EJB (connected to a DB) and produce
> > > HTML pages from both XML/XSL documents and these data.
> >
> > Despite Michael Homeijer interesting answers, there were not
> > many responses, and it seems to me there are never a lot when
> > it comes to EJB and Cocoon. As I am also interested, is
> > really nobody out there who knows much more about it...?
> >
> > Are there any resources available focusing on EJB and Cocoon?
>
> Don't know about resources, but I also don't really see what the issue is?
> In our case we use JBoss with Tomcat and Cocoon.  We define the EJB
> resources through JBoss and don't worry about them in Cocoon.  We then
> package up the Cocoon WAR with our EJB JAR into a EAR and deploy it under
> JBoss.  With the proper JNDI definitions in JBoss all is done; your Cocoon
> classes see the EJBs and away you go.  It took me perhaps a week
> of fiddling
> to get this going, but the magic trick is to make sure you've got all the
> classes in the proper places for the particular combination of Tomcat,
> JBoss, JDK and Cocoon.
>
> Following is a summary of various messages I've found that I used
> to create
> some basic instructions for our developers on how to get the
> whole thing up
> and running.  Some of this is out of date, since new binaries are now
> available that did not exist when I wrote this and life is now a bit
> simpler.
>
> How to deploy Cocoon on JBoss and Tomcat
> 
>
> 1. Deploy tomcat/jboss. Versions 4.0/2.4.3 are apparently known
> to work. We
> use 4.0.4 and 2.4.4.
>Note that according to the Cocoon2 homepage certain beta versions of
> Tomcat dows not work with Cocoon2.
>
>To deploy Tomcat 4.0.4 use the integrated 2.4.4/4.0.1 Tomcat/Jboss then
> copy a Tomcat 4.0.4 install over the
>"catalina" directory structure in the Jboss/Tomcat install. If you do
> this, I'd rename the base directory to
>help keep things straight as to what is installed.
>
> 2. Add environment variable CATALINA_OPTS=-Xdebug -Xnoagent
> -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7070.
>This is to be able to debug java run in Tomcat. For Netbeans 3.2.1 for
> programming/debugging (remember to add port 7070 to debugging
> environment).
>
> 3. Delete in "[your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib" following:
>   -crimson.jar
>   -jaxp.jar
>   -xml.jar
>   (xml.jar is not present in latest versions of JBoss.)
>
>   If Tomcat 3.x is used the following files must be also be deleted: from
> [your path]/JBoss-xxx_Tomcat-3.x/tomcat/lib:
>-parser.jar
>-jaxp.jar
>
>
> 4. new run.bat file in [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/bin to:
>@echo off
>@if not "%ECHO%" == "" echo %ECHO%
>@if "%OS%" == "Windows_NT" setlocal
>
>set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;run.jar
>
>REM Add all login modules for JAAS-based security
>REM and all libraries that are used by them here
>
>REM need one of the two following lines for xerces support
>set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/xerces.jar
>REM set JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/xml-apis.jar
>
>REM Add the XML parser jars and set the JAXP factory names
>REM Crimson parser JAXP setup(default)
>REM set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar
>REM set
> JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson
> .jaxp.Docu
> men tBuilderFactoryImpl
>REM set JAXP=%JAXP%
> -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPa
> rserFactor
> yIm pl
>
>echo JBOSS_CLASSPATH=%JBOSS_CLASSPATH%
>java %JAXP% -classpath "%JBOSS_CLASSPATH%" org.jb

RE: Cocoon and EJB

2002-10-26 Thread Reinhard Poetz
Peter,

Would you mind integrating it into the CocoonWiki
(http://www.outerthought.net)? If no and it's easier for you I can do it for
you.

Regards,
Reinhard

> -Original Message-
> From: Hunsberger, Peter [mailto:Peter.Hunsberger@;stjude.org]
> Sent: Friday, October 25, 2002 4:59 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Cocoon and EJB
>
>
> > > I have a doubt whether it is possible (and easy :) to
> > > fetch data from EJB (connected to a DB) and produce
> > > HTML pages from both XML/XSL documents and these data.
> >
> > Despite Michael Homeijer interesting answers, there were not
> > many responses, and it seems to me there are never a lot when
> > it comes to EJB and Cocoon. As I am also interested, is
> > really nobody out there who knows much more about it...?
> >
> > Are there any resources available focusing on EJB and Cocoon?
>
> Don't know about resources, but I also don't really see what the issue is?
> In our case we use JBoss with Tomcat and Cocoon.  We define the EJB
> resources through JBoss and don't worry about them in Cocoon.  We then
> package up the Cocoon WAR with our EJB JAR into a EAR and deploy it under
> JBoss.  With the proper JNDI definitions in JBoss all is done; your Cocoon
> classes see the EJBs and away you go.  It took me perhaps a week
> of fiddling
> to get this going, but the magic trick is to make sure you've got all the
> classes in the proper places for the particular combination of Tomcat,
> JBoss, JDK and Cocoon.
>
> Following is a summary of various messages I've found that I used
> to create
> some basic instructions for our developers on how to get the
> whole thing up
> and running.  Some of this is out of date, since new binaries are now
> available that did not exist when I wrote this and life is now a bit
> simpler.
>
> How to deploy Cocoon on JBoss and Tomcat
> 
>
> 1. Deploy tomcat/jboss. Versions 4.0/2.4.3 are apparently known
> to work. We
> use 4.0.4 and 2.4.4.
>Note that according to the Cocoon2 homepage certain beta versions of
> Tomcat dows not work with Cocoon2.
>
>To deploy Tomcat 4.0.4 use the integrated 2.4.4/4.0.1 Tomcat/Jboss then
> copy a Tomcat 4.0.4 install over the
>"catalina" directory structure in the Jboss/Tomcat install. If you do
> this, I'd rename the base directory to
>help keep things straight as to what is installed.
>
> 2. Add environment variable CATALINA_OPTS=-Xdebug -Xnoagent
> -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7070.
>This is to be able to debug java run in Tomcat. For Netbeans 3.2.1 for
> programming/debugging (remember to add port 7070 to debugging
> environment).
>
> 3. Delete in "[your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib" following:
>   -crimson.jar
>   -jaxp.jar
>   -xml.jar
>   (xml.jar is not present in latest versions of JBoss.)
>
>   If Tomcat 3.x is used the following files must be also be deleted: from
> [your path]/JBoss-xxx_Tomcat-3.x/tomcat/lib:
>-parser.jar
>-jaxp.jar
>
>
> 4. new run.bat file in [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/bin to:
>@echo off
>@if not "%ECHO%" == "" echo %ECHO%
>@if "%OS%" == "Windows_NT" setlocal
>
>set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;run.jar
>
>REM Add all login modules for JAAS-based security
>REM and all libraries that are used by them here
>
>REM need one of the two following lines for xerces support
>set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/xerces.jar
>REM set JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/xml-apis.jar
>
>REM Add the XML parser jars and set the JAXP factory names
>REM Crimson parser JAXP setup(default)
>REM set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar
>REM set
> JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson
> .jaxp.Docu
> men tBuilderFactoryImpl
>REM set JAXP=%JAXP%
> -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPa
> rserFactor
> yIm pl
>
>echo JBOSS_CLASSPATH=%JBOSS_CLASSPATH%
>java %JAXP% -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %1
> %2 %3 %4 %5
> %6 %7 %8 %9
>
>pause
>
> 5. If you want to be able to debug JBoss/Tomcat/Cocoon2 replace the last
> line (before pause) with:
>
>   java -Xint -Xdebug -Xnoagent -classpath "%JBOSS_CLASSPATH%"
> -Xrunjdwp:transport=dt_socket,server=y,address=12999,suspend=n
> org.jboss.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
>
>If you use Netbeans 3.2.1 for programming/debugg

RE: Cocoon and EJB

2002-10-25 Thread Artur Bialecki
I've been using Cocoon 1 and 2 with EJBs for last
2.5 year for enterprise size application. One advantage
I had was that I decided to use cocoon from the beginning.
so my EJBs can present themselves as XML which makes for
easy insertion into the XML stream.
The biggest problem I had was handling of errors that
EJB methods can throw and are handeled by
redirecting to another page. The way I handle this
is that I have an action that processes the XSP
and store it in a request attribute. The XSP contains
tags that access my EJBs and define error handlers.
Once XSP is processed without errors I call a simple
generator that reads the resulting XML from the 
attribute. 
I only use transormes for xincludes, i18n, and
changing data centric XML representation to GUI
centric representation for complex data models.

This might not be the best way of doing things
but it works for me.

Artur...



> -Original Message-
> From: Bruno Collet [mailto:b_collet@;yahoo.com] 
> Sent: October 25, 2002 6:07 AM
> To: [EMAIL PROTECTED]
> Subject: Cocoon and EJB
> 
> 
> Hi
> I'm investigating the possibility to use Cocoon 2 for
> a big corporate app.
> I have a doubt whether it is possible (and easy :) to
> fetch data from EJB (connected to a DB) and produce
> HTML pages from both XML/XSL documents and these data.
> 
> Does it fit into the Cocoon pipeline architecture
> concept?
> Would it imply writing my own transformers/generators?
> Thx!
> Bruno
> 
> __
> Do you Yahoo!?
> Y! Web Hosting - Let the expert host your web site
> http://webhosting.yahoo.com/
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon and EJB

2002-10-25 Thread Piroumian Konstantin
> From: Gustavo Nalle Fernandes [mailto:gustavonf@;terra.com.br] 
> 
>  In J2EE world, cocoon would play the role of the 
> presentation tier, same as struts. In some cases, cocoon 
> would bypass EJBs, to provide read-only data-retrieval 
> (faster than instantiate thousands of bean in memory). What 
> about a ValueObject generator, that by reflection generates 
> sax events containing a bean atributes and values, with the 
> option of specifing the "depth" (number of levels of child 
> beans) wanted ?

Value objects can be easily XML-ized using Castor transformer. Take a look
at it in Cocoon scratchpad.
Somebody suggested already this solution and also the JXPath-based
generation or XSP logicsheet generator.

--
  Konstantin

> 
> 
> Gustavo
> 
> 
> -Mensagem original-
> De: Emmanuil Batsis (Manos) [mailto:mbatsis@;humanmarkup.org] 
> Enviada em: sexta-feira, 25 de outubro de 2002 11:59
> Para: [EMAIL PROTECTED]
> Assunto: Re: Cocoon and EJB
> 
> 
> Martin Schimak wrote:
> 
> > Are there any resources available focusing on EJB and Cocoon?
> 
> The million dollar question. I'm trying to push Cocoon in the 
> company I work for and I keep stumbling upon it.
> 
> Manos
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon and EJB

2002-10-25 Thread Piroumian Konstantin
Here is the EJB logicsheet for Cocoon 1 and I think that it can be easily
adapted for Cocoon 2.

The author is Yvon Pedron  ([EMAIL PROTECTED]), but he does not
support it any more.

--
  Konstantin Piroumian


> -Original Message-
> From: Martin Schimak [mailto:cocoon-users@;schimak.at] 
> Sent: Friday, October 25, 2002 6:54 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Cocoon and EJB
> 
> 
> Piroumian Konstantin wrote:
> > I have a logicsheet for EJB somewhere, but was developed 
> for Cocoon 1. 
> > If anybody is interested then I can try to find it and send.
> 
> If it's not too complicated, yes, please, would be 
> interesting to look into. Martin.
> 
> 
> > 
> > --
> >   Konstantin Piroumian
> > 
> > 
> > 
> >>-Original Message-
> >>From: Martin Schimak [mailto:cocoon-users@;schimak.at]
> >>Sent: Friday, October 25, 2002 6:46 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: Cocoon and EJB
> >>
> >>
> >>Bruno Collet wrote:
> >> > I have a doubt whether it is possible (and easy :) to fetch data 
> >> > from EJB (connected to a DB) and produce HTML pages from both 
> >> > XML/XSL documents and these data.
> >>
> >>Despite Michael Homeijer interesting answers, there were not
> >>many responses, and it seems to me there are never a lot when 
> >>it comes to EJB and Cocoon. As I am also interested, is 
> >>really nobody out there who knows much more about it...?
> >>
> >>Are there any resources available focusing on EJB and Cocoon?
> >>
> >>Many thx in advance,
> >>Martin.
> >>
> >>
> >>
> >>
> -
> >>Please check that your question  has not already been 
> answered in the
> >>FAQ before posting. 
> <http://xml.apache.org/cocoon/faq/index.html>
> >>
> >>To 
> unsubscribe, e-mail: <[EMAIL PROTECTED]>
> >>For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> >>
> > 
> > 
> -
> > Please check that your question  has not already been 
> answered in the
> > FAQ before posting. 
> <http://xml.apache.org/cocoon/faq/index.html>
> > 
> > To 
> unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> > 
> > 
> > 
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 




ejb-logicsheet.zip
Description: Binary data
-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


RE: Cocoon and EJB

2002-10-25 Thread Hunsberger, Peter
> > I have a doubt whether it is possible (and easy :) to
> > fetch data from EJB (connected to a DB) and produce
> > HTML pages from both XML/XSL documents and these data.
>
> Despite Michael Homeijer interesting answers, there were not
> many responses, and it seems to me there are never a lot when
> it comes to EJB and Cocoon. As I am also interested, is
> really nobody out there who knows much more about it...?
> 
> Are there any resources available focusing on EJB and Cocoon?

Don't know about resources, but I also don't really see what the issue is?
In our case we use JBoss with Tomcat and Cocoon.  We define the EJB
resources through JBoss and don't worry about them in Cocoon.  We then
package up the Cocoon WAR with our EJB JAR into a EAR and deploy it under
JBoss.  With the proper JNDI definitions in JBoss all is done; your Cocoon
classes see the EJBs and away you go.  It took me perhaps a week of fiddling
to get this going, but the magic trick is to make sure you've got all the
classes in the proper places for the particular combination of Tomcat,
JBoss, JDK and Cocoon.  

Following is a summary of various messages I've found that I used to create
some basic instructions for our developers on how to get the whole thing up
and running.  Some of this is out of date, since new binaries are now
available that did not exist when I wrote this and life is now a bit
simpler.

How to deploy Cocoon on JBoss and Tomcat


1. Deploy tomcat/jboss. Versions 4.0/2.4.3 are apparently known to work. We
use 4.0.4 and 2.4.4. 
   Note that according to the Cocoon2 homepage certain beta versions of
Tomcat dows not work with Cocoon2.

   To deploy Tomcat 4.0.4 use the integrated 2.4.4/4.0.1 Tomcat/Jboss then
copy a Tomcat 4.0.4 install over the
   "catalina" directory structure in the Jboss/Tomcat install. If you do
this, I'd rename the base directory to
   help keep things straight as to what is installed.

2. Add environment variable CATALINA_OPTS=-Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7070.
   This is to be able to debug java run in Tomcat. For Netbeans 3.2.1 for
programming/debugging (remember to add port 7070 to debugging environment).

3. Delete in "[your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib" following:
  -crimson.jar
  -jaxp.jar
  -xml.jar
  (xml.jar is not present in latest versions of JBoss.)

  If Tomcat 3.x is used the following files must be also be deleted: from
[your path]/JBoss-xxx_Tomcat-3.x/tomcat/lib:
   -parser.jar
   -jaxp.jar


4. new run.bat file in [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/bin to:
   @echo off
   @if not "%ECHO%" == "" echo %ECHO%
   @if "%OS%" == "Windows_NT" setlocal

   set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;run.jar

   REM Add all login modules for JAAS-based security
   REM and all libraries that are used by them here

   REM need one of the two following lines for xerces support
   set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/xerces.jar
   REM set JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/xml-apis.jar

   REM Add the XML parser jars and set the JAXP factory names
   REM Crimson parser JAXP setup(default)
   REM set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar
   REM set
JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Docu
men tBuilderFactoryImpl
   REM set JAXP=%JAXP%
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactor
yIm pl

   echo JBOSS_CLASSPATH=%JBOSS_CLASSPATH%
   java %JAXP% -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %1 %2 %3 %4 %5
%6 %7 %8 %9

   pause

5. If you want to be able to debug JBoss/Tomcat/Cocoon2 replace the last
line (before pause) with:

  java -Xint -Xdebug -Xnoagent -classpath "%JBOSS_CLASSPATH%"
-Xrunjdwp:transport=dt_socket,server=y,address=12999,suspend=n
org.jboss.Main %1 %2 %3 %4 %5 %6 %7 %8 %9

   If you use Netbeans 3.2.1 for programming/debugging remember to add port
12999 to debugging environment.

6. copy xerces.jar to [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib. We used
versions 1.4.3.
   Download xerces binary and use .jar file in the downloaded xerces_xxx.zip
   The Apache site suggests that you should copy xml-apis.jar from
cocoon/lib/core/ to jboss/lib.
   However, I did not have to do this.  If you think you need xml-apis.jar
you may also want to uncomment the
   line in run.bat that refers to it and comment the line that uses xerces.
Only one of these should be needed...

7. add environment variable TOMCAT_HOME=[your
path]/JBoss-2.4.3_Tomcat-4.0/catalina/
   (if a Tomcat 3.x version is used "catalina" must be substituted with
"tomcat").
   This is for use with Cocoon ant file: build.bat.


8. Test that JBoss/Tomcat starts up and responds on port 8080/jboss
   Contrary to some documentation the test application still works fine.


Cocoon and Java 1.4 configuration
-

Cocoon requires more recent versions of the Xerces and Xalan libr

RE: Cocoon and EJB

2002-10-25 Thread Leigh Dodds
I'd originally planned to do some work with Cocoon and EJB, but 
didn't get very far.

I was going to use Cocoon as an alternate presentation layer for 
my J2EE application and was therefore planning to integrate them 
by writing XSP pages (with helper classes and logicsheets for 
each EJB) to talk to the bean, and then use pipelines for all the 
downstream processing.

/ducks head back under workload.

Cheers,

L.



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Cocoon and EJB

2002-10-25 Thread Martin Schimak
Piroumian Konstantin wrote:

I have a logicsheet for EJB somewhere, but was developed for Cocoon 1.
If anybody is interested then I can try to find it and send.


If it's not too complicated, yes, please, would be interesting to look into.
Martin.




--
  Konstantin Piroumian




-Original Message-
From: Martin Schimak [mailto:cocoon-users@;schimak.at] 
Sent: Friday, October 25, 2002 6:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Cocoon and EJB


Bruno Collet wrote:
> I have a doubt whether it is possible (and easy :) to
> fetch data from EJB (connected to a DB) and produce
> HTML pages from both XML/XSL documents and these data.

Despite Michael Homeijer interesting answers, there were not 
many responses, and it seems to me there are never a lot when 
it comes to EJB and Cocoon. As I am also interested, is 
really nobody out there who knows much more about it...?

Are there any resources available focusing on EJB and Cocoon?

Many thx in advance,
Martin.



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>







-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Cocoon and EJB

2002-10-25 Thread Emmanuil Batsis (Manos)
Martin Schimak wrote:


Are there any resources available focusing on EJB and Cocoon?


The million dollar question. I'm trying to push Cocoon in the company I 
work for and I keep stumbling upon it.

Manos



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>



RE: Cocoon and EJB

2002-10-25 Thread Piroumian Konstantin
I have a logicsheet for EJB somewhere, but was developed for Cocoon 1.
If anybody is interested then I can try to find it and send.

--
  Konstantin Piroumian


> -Original Message-
> From: Martin Schimak [mailto:cocoon-users@;schimak.at] 
> Sent: Friday, October 25, 2002 6:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Cocoon and EJB
> 
> 
> Bruno Collet wrote:
>  > I have a doubt whether it is possible (and easy :) to
>  > fetch data from EJB (connected to a DB) and produce
>  > HTML pages from both XML/XSL documents and these data.
> 
> Despite Michael Homeijer interesting answers, there were not 
> many responses, and it seems to me there are never a lot when 
> it comes to EJB and Cocoon. As I am also interested, is 
> really nobody out there who knows much more about it...?
> 
> Are there any resources available focusing on EJB and Cocoon?
> 
> Many thx in advance,
> Martin.
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Cocoon and EJB

2002-10-25 Thread Martin Schimak
Bruno Collet wrote:
> I have a doubt whether it is possible (and easy :) to
> fetch data from EJB (connected to a DB) and produce
> HTML pages from both XML/XSL documents and these data.

Despite Michael Homeijer interesting answers, there were not
many responses, and it seems to me there are never a lot when
it comes to EJB and Cocoon. As I am also interested, is
really nobody out there who knows much more about it...?

Are there any resources available focusing on EJB and Cocoon?

Many thx in advance,
Martin.



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon and EJB

2002-10-25 Thread Michael Homeijer
I think you have some options in Cocoon:

- Use the castortransformer to transform the resulting data from a bean to
XML. (and then process it additionally with XSL).
- Use the velocity generator to get data from a value-object result from an
EJB.
- Write a jxpath transformer (is probably allready available as part of the
xmlforms solution) to get data from a value-object in xml.

In all solutions you probably have to get the result from an EJB in an
action class and put it in the request object. Other possibilities would be
to output your bean data in XSP, that would probably mean writing a lot of
code, or to adapt the xmlforms solution to use EJB's. 

HTH
Michael
-Original Message-
From: Bruno Collet
To: [EMAIL PROTECTED]
Sent: 25-10-2002 12:06 
Subject: Cocoon and EJB

Hi
I'm investigating the possibility to use Cocoon 2 for
a big corporate app.
I have a doubt whether it is possible (and easy :) to
fetch data from EJB (connected to a DB) and produce
HTML pages from both XML/XSL documents and these data.

Does it fit into the Cocoon pipeline architecture
concept?
Would it imply writing my own transformers/generators?
Thx!
Bruno

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>