[opencms-dev] OpenCms Access like CmsShell - Experience?

Wouter.DERUYCK at cec.eu.int Wouter.DERUYCK at cec.eu.int
Tue Nov 11 14:37:01 CET 2003


Hi,

the OpenCmsHttpServlet is loaded on startup when the opencms web application
is loaded (add <load-on-startup>1</load-on-startup> to your web.xml).  The
OpenCmsHttpServlet is loaded, the init method gets invoked, my static
variable OpenCms of my wrapper class gets initialized. I can use my wrapper
class and hence any other OpenCms functionality through the CmsObject API in
any  JSP/servlet or any block of java code in the same JVM .  If you want to
use this wrapper class outside the JVM of the OpenCms web application , you
will need to functionality you need through a web service. In fact I did
that as well, because I use another web application (cocoon from apache) to
read and write  XML files , stored in  OpenCms,  to transform them to HTML.

-----Original Message-----
From: ambiesense at gmx.de [mailto:ambiesense at gmx.de]
Sent: mardi 11 novembre 2003 14:15
To: opencms-dev at opencms.org
Subject: RE: [opencms-dev] OpenCms Access like CmsShell - Experience?


Hi,

your approach is great but requires that OpenCms is triggering the
appliation. First you start OpenCms your wrapper is called automatically and
your
appliation do something. (Please correct me if I am wrong).

What would I have to do if OpenCms (inside Tomcat) and my application shall
run independently. The basic problem is that I cannot allow OpenCms to start
the application. The application should start OpenCms and connect to the
singleton instance. To put it in other words my application  should use
OpenCms
as a (very smart and function rich) persistency DB layer.

Any ideas?

Ralf

> Of course, my package opencms.addons is a package I created myself...
> 
> wouter
> 
> -----Original Message-----
> From: ambiesense at gmx.de [mailto:ambiesense at gmx.de]
> Sent: mardi 11 novembre 2003 12:44
> To: opencms-dev at opencms.org
> Subject: RE: [opencms-dev] OpenCms Access like CmsShell - Experience?
> 
> 
> Hi,
> 
> thank you for that info.
> 
> Is this possible if the OpenCMS Wrapper is in a different package 
> outside
> jar (i.e. com.mycompany.mypackage.Wrapper) ?
> 
> Cheers,
> Ralf
> 
> 
> > I experimented with modifying the OpenCmsHttpServlet. I added a line 
> in 
> > the
> > init method to have access to the OpenCms object afterwards.
> > 
> >            // create the OpenCms object
> >             m_opencms = new OpenCms(m_configurations);
> >           
> >             // added by myself
> > 
> >             opencms.addons.CmsWrapper.setOpenCms(m_opencms);
> > 		// end added by myself
> > 
> > 
> > So I have access to the singleton OpenCms in my wrapper class via a 
> > static
> > method. With that OpenCms object, I can make instances of CmsObject 
> to 
> > call
> > whatever I want (users, files,tasks...)
> > 
> > wouter
> > 
> > 
> > -----Original Message-----
> > From: ambiesense at gmx.de [mailto:ambiesense at gmx.de]
> > Sent: mardi 11 novembre 2003 11:53
> > To: opencms-dev at opencms.org
> > Subject: [opencms-dev] OpenCms Access like CmsShell - Experience?
> > 
> > 
> > Hello OpenCMS community,
> > 
> > did anybody make experience in accessing an OpenCMS instance like 
> > CmsShell
> > and could provide infos or even sourcecode? 
> > 
> > Does somebody know whats happening when the CmsShell is starting,
> > exspecially in the constructor? This would help me to get easier into
> > understanding it.
> > 
> > Thank you,
> > Ralf
> > 
> > -- 
> > NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
> > Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
> > 
> > Jetzt kostenlos anmelden unter http://www.gmx.net
> > 
> > +++ GMX - die erste Adresse für Mail, Message, More! +++
> > 
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please 
> > visit
> > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please 
> visit
> > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > 
> 
> -- 
> NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
> Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
> 
> Jetzt kostenlos anmelden unter http://www.gmx.net
> 
> +++ GMX - die erste Adresse für Mail, Message, More! +++
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list