Help me Jesub! [message #97904] |
Thu, 20 September 2007 15:18  |
Eclipse User |
|
|
|
Originally posted by: RudyBone.gmail.com
Hi,
I was hoping someone could help me with the following:
I have a working RCP application built from a number of plugins and
extensions.
The app is a Project oriented diagramming tool that lets users create and
manipulate diagrams on their local machine.
Part of the diagram functionality includes allowing the user to drag and
drop files from Windows Explorer onto a diagram element; the element
stores the path as an attachment and a Lucene Index plugin indexes the
contents of the attachment.
The Indexer plugin defines a DocumentHandler extension point so that we can
build file specific (Word, PowerPoint, Excel etc) indexer plugins.
The main RCP app has a DocumentHandler plugin loader that uses the Extension
Registry to locate all of the various Document Handler plugins to load each
file-specific Document Handler which then registers itself with the Primary
Indexer, i.e. it adds itself to a map consisting of the file name extension
and mimetype.
All of this is just the background for the following.
We now have begun to implement Server based Project/Diagram creation and
editing by using a standard WebDAV servlet with JBoss 4.2.
The user can now create and share projects/diagrams on the server from the
RCP app.
Now we come to the actual issue:
I would like to be able to move the Indexer plugin and the dynamic
DocumentHandler extension plugin loader stuff over to the server, such that
when the server is started my file-specific DocumentHandlers get loaded into
the Server JVM much like they are loaded into my RCP jvm.
I have been researching the Equinox OSGI server side frame work. I
downloaded the sample code (servlet bridge etc) from the Equinox site and
got them working with my JBoss installation. I have also downloaded Wolfgang
Gehners RSP (Rich Server Platform) demo and run it.
After all this it is still not clear to me how or if I can use Equinox to do
dynamic plugin loading. I don't really want to implement my DocumentHandler
plugins as servlets. My plan was to write a servlet filter to wrap the
WebDAV servlet that I am using, such that when I detect that the WebDAV
servlet has written a new file to the server, I can use my Indexing
framework to invoke the proper DocumentHandler to index the resulting file.
Am I barking up the wrong tree here? e.g. is server-side Equinox the right
technology for this and if so, can anyone offer a suggestion as to how I
might proceed.
Much appreciation if you've read this far and for any subsequent help
Rudy Bonefas
Senior Systems Architect
Next Century Corp.
|
|
|
Re: Help me Jesub! [message #97923 is a reply to message #97904] |
Thu, 20 September 2007 17:38   |
Eclipse User |
|
|
|
Hi Rudy,
What you're doing sounds reasonable. Which WebDAV servlet are you using?
Slide or ... ?
You'll want to register your DAV Servlet with the Http Service either
directly or by using the http.registry extensions. If you want to wrap it
with a filter see the FilterServletAdaptor in
equinox-incubator/org.eclipse.equinox.http.helper. Lucene is no problem.
To start off (and in general at dev time) I'd use the Jetty based Http
Service that comes built in with the Eclipse 3.3 SDK. Once you've got
everything working properly you can move to operating under the
servletbridge as both environments are just OSGi with an Http Service with
the underlying details about precisely where you're running hidden..
HTH
-Simon
"exquisitus" <RudyBone@gmail.com> wrote in message
news:fcuh1v$31o$1@build.eclipse.org...
> Hi,
>
> I was hoping someone could help me with the following:
>
> I have a working RCP application built from a number of plugins and
> extensions.
> The app is a Project oriented diagramming tool that lets users create and
> manipulate diagrams on their local machine.
> Part of the diagram functionality includes allowing the user to drag and
> drop files from Windows Explorer onto a diagram element; the element
> stores the path as an attachment and a Lucene Index plugin indexes the
> contents of the attachment.
> The Indexer plugin defines a DocumentHandler extension point so that we
> can build file specific (Word, PowerPoint, Excel etc) indexer plugins.
> The main RCP app has a DocumentHandler plugin loader that uses the
> Extension Registry to locate all of the various Document Handler plugins
> to load each file-specific Document Handler which then registers itself
> with the Primary Indexer, i.e. it adds itself to a map consisting of the
> file name extension and mimetype.
>
> All of this is just the background for the following.
>
> We now have begun to implement Server based Project/Diagram creation and
> editing by using a standard WebDAV servlet with JBoss 4.2.
> The user can now create and share projects/diagrams on the server from the
> RCP app.
>
> Now we come to the actual issue:
>
> I would like to be able to move the Indexer plugin and the dynamic
> DocumentHandler extension plugin loader stuff over to the server, such
> that when the server is started my file-specific DocumentHandlers get
> loaded into the Server JVM much like they are loaded into my RCP jvm.
>
> I have been researching the Equinox OSGI server side frame work. I
> downloaded the sample code (servlet bridge etc) from the Equinox site and
> got them working with my JBoss installation. I have also downloaded
> Wolfgang Gehners RSP (Rich Server Platform) demo and run it.
>
> After all this it is still not clear to me how or if I can use Equinox to
> do dynamic plugin loading. I don't really want to implement my
> DocumentHandler plugins as servlets. My plan was to write a servlet
> filter to wrap the WebDAV servlet that I am using, such that when I detect
> that the WebDAV servlet has written a new file to the server, I can use my
> Indexing framework to invoke the proper DocumentHandler to index the
> resulting file.
>
> Am I barking up the wrong tree here? e.g. is server-side Equinox the right
> technology for this and if so, can anyone offer a suggestion as to how I
> might proceed.
>
> Much appreciation if you've read this far and for any subsequent help
>
> Rudy Bonefas
> Senior Systems Architect
> Next Century Corp.
>
|
|
|
|
Re: Help me Jesub! [message #97983 is a reply to message #97970] |
Fri, 21 September 2007 12:06  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_001E_01C7FC47.D414F7D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
re: WebDAV servlet.
Hmm... I'm not sure how easy that is to separate from the Catalina =
runtime. To run in the Equinox environment your servlets generally have =
to be self-contained in the OSGi environment. You might possibly be able =
to get this to work (in Tomcat and JBoss only) by using =
extendedFrameworkExports in the servlet bridge web.xml
> I appreciate the response, but it doesn't really address my problem.=20
> Let me reiterate:How do I perform dynamic plugin loading (possibly =
using the Extension Registry) on a Server?
There is no difference between rcp vs. server here. You can use the =
extension registry however and wherever you like since it's dependencies =
are relatively minor. (e.g. org.eclipse.equinox.common).
Case in point, one of the server-side projects =
(org.eclipse.equinox.http.registry) uses the extension registry to =
provide the "servers" and "resources" extension-points.
-Simon
------=_NextPart_000_001E_01C7FC47.D414F7D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial color=3D#000080>re: WebDAV servlet.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080>Hmm... I'm not sure how =
easy that is to=20
separate from the Catalina runtime. To run in the Equinox environment =
your=20
servlets generally have to be self-contained in the OSGi environment. =
You might=20
possibly be able to get this to work (in Tomcat and JBoss only) by using =
extendedFrameworkExports in the servlet bridge web.xml</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#000080>> I appreciate the response, =
but it=20
doesn't really address my problem. </FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080>> Let me =
reiterate:</FONT><FONT=20
face=3DArial color=3D#000080>How do I perform dynamic plugin loading =
(possibly using=20
the Extension Registry) on a Server?</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#000080>There is no difference between =
rcp vs.=20
server here. You can use the extension registry however and wherever you =
like=20
since it's dependencies are relatively minor. (e.g.=20
org.eclipse.equinox.common).</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#000080>Case in point, one of the =
server-side=20
projects (org.eclipse.equinox.http.registry) uses the extension registry =
to=20
provide the "servers" and "resources" extension-points.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080></FONT> </DIV>
<DIV><FONT face=3DArial =
color=3D#000080>-Simon</FONT></DIV></BODY></HTML>
------=_NextPart_000_001E_01C7FC47.D414F7D0--
|
|
|
Powered by
FUDForum. Page generated in 0.04007 seconds