[opencms-dev] Challange! External Program access to OpenCMS Instance...

Ralf Bierig ambiesense at gmx.de
Mon Nov 10 22:35:01 CET 2003


Hello Matt,

thank you very much for your comprehensive and long answer. I appreciate
your effort.

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?

Thank you very much in advance,
Ralf

> 
> All right... I'll give a longer answer:
> 
> 1) For one servlet/app to be able to access the runtime vars of another 
> servlet/app would be a big security risk. However, somewhere in the 
> Tomcat docs, there may be info on doing that. You could look for that. 
> I'd be surprised if it was allowed, though.
> 
> 2) I've seen an app that worked directly on the OpenCMS database. It 
> could directly manipulate the data that OpenCMS could access -- HOWEVER, 
> it broke just about every safety constraint that OpenCMS put in place 
> (for instance, locking). While it's possible, I'd only implement this if 
> the external process was only reading the DB (not writing), so that is 
> probably out for you.
> 
> 3) You could try to find a way to externally get an interface to an 
> OpenCms object. Alexander may know of a way, but it is certainly not 
> documented, nor obvious from the code. In fact, I can't think of a way 
> that this would even be done. The CmsShell does something like this (I 
> think it creates a new instance of whatever class implements A_OpenCms), 
> but IIRC there were some warnings about running it while the servlet was 
> running (since you have two instances of A_OpenCms).
> 
> 4) You can implement some sort of RPC mechanism, such as SOAP. I 
> wouldn't imagine that it would really be a bottleneck, but it would 
> certainly take a long time to develop. When you think about it, net 
> sockets are just another form of IPC, and when the language is (like 
> Java) considerably abstracted from the underlying OS, sockets are one of 
> the few viable IPC mechanisms. You can, of course, look into the other 
> Java ORB-style stuff as well, though I can't imagine that being faster 
> to implement.
> 
> 5) You can screen-scrape. I generally consider this a bad idea. You 
> would basically write a web client to work over HTTP with HTML.
> 
> 6) Depending on your circumstances, you may be able to do some sort of 
> pseudo-IPC by setting up a cron class to check a queue (either in the FS 
> or in a new DB table(s)) for new information, and then process whatever 
> you need. Then the other application would only have to drop info into 
> the queue. Or you may set up that cron class to simply start the other 
> program (in code) and manipulate the data.
> 
> Matt
> 
> Ralf Bierig wrote:
> 
> >Hi,
> >
> >thank you for your suggestion. But if I want to stay on the same machine
> and
> >it would be not very beneficial to introduce such an extreme bottleneck
> like
> >SOAP. An API call would prob. be a 100 times faster...
> >
> >Is there no direct method?
> >
> >Cheers,
> >Ralf
> >
> >  
> >
> >>Implement SOAP or XML-RPC commands and use HTTP(S) for transport?
> >>
> >>Matt
> >>
> >>ambiesense at gmx.de wrote:
> >>
> >>    
> >>
> >>>Hi,
> >>>
> >>>some time ago I posted the question about the possibility to perform
> the
> >>>following szenario, which I think is quite a challange:
> >>>
> >>>On the Server Tomcat is running with OpenCMS 5.0 inside. Also on the
> >>>      
> >>>
> >>server,
> >>    
> >>
> >>>there is a Java program which accesses this OpenCMS instance through
> the
> >>>Tomcat servlet engine (or otherwise). The program should be able to
> >>>      
> >>>
> >>access all
> >>    
> >>
> >>>runtime (instance) information like user/usergroup info as well as
> static
> >>>      
> >>>
> >>info
> >>    
> >>
> >>>like files etc. The program would log in, access files (read/write) do
> >>>administration etc. and log out after finishing its tasks. There could
> be
> >>>      
> >>>
> >>more
> >>    
> >>
> >>>then one program to access the same instance and work similaniously.
> >>>      
> >>>
> >>These
> >>    
> >>
> >>>programms would work like users simulaniously.
> >>>
> >>>How could this be archived?? 
> >>>
> >>>The only, not tested, possiblity offered at that time was using an
> >>>      
> >>>
> >>apporach
> >>    
> >>
> >>>similar to what the CMSShell is doing. However this approach does not
> >>>      
> >>>
> >>work
> >>    
> >>
> >>>really like a client since it builts a server with all the database
> >>>      
> >>>
> >>connection
> >>    
> >>
> >>>and other ballast. I basically want just an access point to the
> instance
> >>>though the API. This means basically an access the CMSObject by using
> >>>      
> >>>
> >>normal API
> >>    
> >>
> >>>interface (and not via JSP).
> >>>
> >>>Does somebody has any ideas of how this could be done? Does OpenCMS
> offer
> >>>      
> >>>
> >>a
> >>    
> >>
> >>>way of doing that?
> >>>
> >>>Any help would be hightly appreciated,
> >>>Ralf  
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>_______________________________________________
> >>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! +++




More information about the opencms-dev mailing list