[opencms-dev] Challange! External Program access to OpenCMS Instance...
M Butcher
mbutcher at grcomputing.net
Mon Nov 10 22:59:02 CET 2003
Ralf,
Ralf Bierig wrote:
> Would possiblity number 3), which is done in CmsShell, be secure if this
> application would be the only access of OpenCMS. This CmsShell stylish
> application would basicall hold an instance. Does this instance then only run within
> CmsShell or does is connect to the instance running in Tomcat? The code looks
> like the first option...
>
> The CmsShell stylisch appliation could work as a kind of proxy and allow
> other clients to access i.e. via RMI and provide access (read / write) to files.
> The CmsShell stylish proxy could also provide an interface to allow other
> clients to log in and out and therfore do everthing with external access.
>
> Would this be possible?
Here's what I'm unsure of: starting CmsShell creates a new instance of
the OpenCms singleton (which is the extension of A_OpenCms).
As far as I understand it (based on the comments in OpenCms.java), there
should only be one instance of OpenCms. If the servlet is running, and
the CmsShell is running, then there are two instances (in different
processes/JREs).
I don't know if it is okay to have two instances of OpenCms if they are
in different processes/JREs. It seems that tracking locks would be very
difficult, and caching would introduce some problems as well, but if the
database provides enough state information, it seems it could work.
Alexander Kandzior is the only one I can think of who might know the
answer to this question.
Other than that, your idea sounds very good. The CmsShell constructor
has a good example of creating a new instance of OpenCms. That would get
you started.
Matt
More information about the opencms-dev
mailing list