I am trying to understand how a contribution that contains a mix of 
artifacts, including JEE artifacts, should be handled by Tuscany and the 
runtime into which it is being deployed.

Here's a scenario just to make it concrete. Imagine I have a contribution 
that includes some JEE UI components like some servlets or JSPs, some Java 
SCA components, and just to make it tricky an EJB that is also an SCA 
component (if that's not possible yet then I am guessing it will be in the 
future). And suppose, to be specific, that I want to deploy this onto 
Websphere Application Server (WAS). 

In this scenario I really want to understand things like what should 
happen during deployment and runtime, and how Tuscany and WAS should 
cooperate during class loading and instantiation and do any dependency 
injection.

I can think of two different approaches. 

The first is to put Tuscany firmly in charge, which as far as I can see is 
roughly what the SOA feature pack for WAS does: you define Business Level 
Applications (which must be related to domains in some way) and then you 
can add contributions to them explicitly and start and stop them explictly 
from extra panels in the admin console. I imagine (only imagine, note, I 
haven't looked) that when you add the contribution it gets put somewhere; 
when you start the BLA a domain gets created, and the SOA FP is in charge 
while classes get loaded and instantiated and dependency injection gets 
done. But, I don't know what would happen with a contribution with an ejb 
in it since the SOA FP doesn't handle JEE artifacts yet. At what point 
would the ejb get given to the ejb container? 

The other approach is to leave WAS in charge as far as possible. Normal 
WAS deployment time behaviour is to examine the ear file and to pass 
whatever it finds to the appropriate handler for deployment: servlets to 
the web containre, ejbs to the ejb container etc. I can imagine just 
adding in a new step which is "during normal ear file processing, if you 
find an SCA contribution, locate an SCA domain and give the contribution 
to it". In fact with WAS 6.1 which is based on OSGI you can add in 
processing like this non-invasively. But then in this case if Tuscany 
opened the contribution and found an ejb that was a component would it 
have to give the ejb back to WAS?

That's just thinking about deployment. I have various things that are 
puzzling me about what should happen at runtime: who should create, start 
and stop the SCA domain, who actually does class loading, Tuscany or WAS, 
and if WAS loads a class and instantiates it and it is a component then 
how does it give the instance to Tuscany for dependency injection.

Essentially it seems to me that Tuscany and WAS are both meaty runtimes 
that are used to being in charge by themselves, especially WRT class 
loading and instantiation. Has anyone thought this all through and can 
tell me how it ought to work?

Matthew Peters





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





Reply via email to