On Fri, Jun 6, 2008 at 3:15 PM, Miles, Chris <[EMAIL PROTECTED]> wrote:
> Hi, thanks very much for a response. I will try explain this better. > > In a traditional J2EE application like many I have worked on in the past > the way I would normally develop them in a EJB sense is: Firstly I would > develop my DAO components - EJB Entity beans for example. I would then > develop my business layer components - EJB Session beans for example. I > would then develop a web application which using JNDI would be able to > look up the beans and use them. If I made a change to just one of the > DAO components all I would need to do is drop it into the server's > (JBoss) deploy directory and the container would load the bean and make > it available to my business layer, and indeed any other business layer > components which would use it. > > Trying to go for more lightweight development, I am making a transition > away from EJBs (more so Entity beans) as the development and > maintainability of them is too high. At the moment I am using a lot of > lightweight Hibernate DAOs, but I am building and deploying my entire > source tree as one task. > > I would like to break these various parts back down into components > which I can freely change about required. So for example I would like to > have my Hibernate DAO implementations as components which implement a > specific interface, likewise I may have plain JDBC DAO implementations. > > The way I see this is as follows (broken into a very simple example): > > I have two web applications: "WebApp1" and completely separate > "WebApp2", and I want both of them to be able to use the same component. > The two web apps are contained within their own war/ear etc. How do I > start implementing a shared component which both of the web applications > can use? > > I hope that makes a little more sense. > > Thanks > > Chris Hi Chris Yes, that helps me a lot. So in your example you have WebApp1 WebApp2 BusinessApp3 Where WebApp1 and WebApp2 both use a component service provided by BusinessApp3 Let's assume that these are 3 independent SCA contributions and that the WebApp1 and WebApp2 are going to communicate with BusinessApp3 over some remote binding such as binding.rmi. There are a couple of ways that I believe you can make this work for you today with Tuscany. 1) Based on you knowledge of where you are going to deploy these as you develop them you can manually configure binding.rmi definitions in the composites in each of these contributions to so that the references can find the services. You can then deploy WebApp1, WebApp2 and BusinessApp3 and use the. You can of course stop and restart BusinessApp3 and expect WebApp1 and WebApp2 to still work assuming that the interface that service interfaces in BusinessApp3 haven't changed. This is a very static approach but should work. 2) Use our domain manager to handle the configuration for you. Exactly the same thing that you did in 1) will happen under the covers but the domain manager will set up the binding URIs for you. I can imagine that you would want this to be a little more dynamic in the future so welcome you input on how we need to improve Tuscany to make it work in the way you expect it to. This is an interesting scenario. It would be great to have a sample for Tuscany to show how to make option 1) work to start with. Regards Simon
