You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Stephen McConnell <mc...@apache.org> on 2003/11/14 02:00:11 UTC

Turbine 2.4 updates

Eric:

I now have things running under the Turbine 2.4 tests.  Here is a 
summary of the updates.

First off - in project.xml, I've updated the hello demo jar to include a 
service so that you can resolve it to a service in your testcase.  You 
need to replace the hello dependency definition with the following:

     <dependency>
      <groupId>merlin/tutorial</groupId>
      <artifactId>hello</artifactId>
      <version>1.1</version>
     </dependency>

Next, update /jakarta-turbine-2/conf/test/merlin/BLOCK-INF/block.xml to 
include the updated hello demo.

     <repository>
       <resource id="merlin/tutorial:hello" version="1.1"/>
     </repository>

Finally, in MerlinComponentServiceTest.java there are a number of 
changes as some comments about how things work in container-land. I've 
attached an updated version of the source to this message.  Changes include:

1. Your implementation of lookup is doing a "locate" against a block
   this returns an Appliance (which is a manager of a component type).
   The only change here is to cast it as an Appliance instead of an
   Object.

      Appliance appliance =
       (Appliance) getService().lookup("/tutorial/hello");

2. In the your version of the test you are attempting to case the
   appliance to HelloComponent (and that's not going to work). You
   cannot actually access the component but can get the service that
   the component exports.  For example:

      Hello hello = (Hello) appliance.resolve();

Thjere is still a test failure in DefaultTurbineRunDataTest but this 
doesn't look like a Merlin problem.

Cheers, Steve.

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|