[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] Accessing Plugins from WAS


Hi,

Thanks for your quick response!  I'm not sure how you want to continue this conversation, so I also wrote directly to you.  

I'm confused on several points, but perhaps the most basic is how to translate the URL mappings to the extension points, which is what lead me
to my alternative solution.

When you use the Websphere development wizards to create web services, the WSDL that is created contains the url of the web service.  It is usually
something like "http:/<hostname>:<port>/<WAR Name>/services/<servlet name>", where the servlet is the implementation of
the Web Services, but NOT an actual HttpServlet class.  The servlet class is generated by the wizard somehow, and is not available.
There is no URL mapping generated in the web.xml file for the servlet.  Therefore, I don't know how to do this translation.

Rich Piazza
IBM Rational Software
20 Maguire Road
Lexington, MA 02421
781-676-2462
781-676-2540 (Fax)



"Kaegi, Simon" <Simon.Kaegi@xxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

08/21/2006 01:24 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
"Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>
cc
Subject
RE: [equinox-dev] Accessing Plugins from WAS





Hi Rich,
 
I think the various wizard use-cases like this are interesting as they're already in wide use.
A while back BJ mentioned, a "WAR to WAB (Web Application Bundle) translation tool" and associated web container spec. These might be good things to consider supporting in 3.3 if you want to open an "enhancement". In particular I'm interested in adding better tooling support both for general creation of this type of application as well as translation of existing web apps.
 
--
for your question ...
Without directly seeing your application its fairly hard to say what's best however I'd suggest that if you want to make use of Eclipse functionality that you migrate your servlet application  to be exposed within Equinox through the HttpService. As you're discovering, creating a hybrid is very tough. Generally I'd reserve the overriding of the FrameworkLauncher for use in handling specialized deployment scenarios.
 
In terms of creating your intial WAB I'd suggest you start quick and dirty packaging the whole WAR file in a bundle and then later refine its various components into bundles. For most web applications the URL mappings in your web.xml can be translated to the extension-points in org.eclipse.equinox.http.registry. For webapps with more complex lifecycle needs I'd suggest direct use of the OSGi Http Service.
 
Once you've created your web app bundle drop it in WEB-INF/platform/plugins and restart your servlet container. If your bundle uses the Http Service directly you might also need to start it in config.ini.
 
Hope this helps.
-Simon

From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Richard Piazza
Sent:
Monday, August 21, 2006 11:49 AM
To:
equinox-dev@xxxxxxxxxxx
Subject:
[equinox-dev] Accessing Plugins from WAS



I'm using WAS 6.1.  I have constructed Web Services using the wizards in AST 6.1.  I want the implementation of these services to call plugin code.  I know that there are several problems here - including the fact that WAS 6.1 uses Eclipse 3.1 plugins, and the functionality I seek is more related to Eclipse 3.2.


It was suggested that I use the Equinox bridge.  This seems difficult, because the servlets that I'm using are created via the wizards in AST, and I find it hard to determine how I would register them so the bridge could access them.


What I decided to do instead was to subclass the FrameworkLauncher, removing most of the servlet references (and currently hardcoding the access to the bridge war, which contains my plugins that I need).  Looking at the BridgeServlet code, it changes the context classloader of the running thread, and then calls the proxy servlet, which will call the registered servlet.  I figured, that I could create the appropriate context classloader using my FrameworkLauncher class, and then before I try to load the first plugin class, I would change the context classloader to the one I just created.


This seemed to almost work, but the context classloader was not able to load/find any plugin classes, beyond the ones related to the framework itself.  On the other hand, the framework started just fine, and loaded all of my bundles.  However, when I look at the context classloader that is created, it seems like there is no connection between it and the bundle classloaders created by the framework.

Am I just on the wrong track?  Is what I'm trying to do just silly??  Is there any hints you can provide??


Any help would be greatly appeciated!


Rich Piazza
IBM Rational Software
20 Maguire Road
Lexington, MA 02421
781-676-2462
781-676-2540 (Fax)

 
     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you. _______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev