Jump to: navigation, search

Difference between revisions of "Virgo/Community/Migrating from 3.0.x to 3.5.0"

(Transformer Signature)
m
Line 1: Line 1:
= Modified Directory Layout =
+
= Modified Directory Layout =
  
TBD
+
Virgo's distributions will have a slightly modified directory layout from 3.5.0 onwards. It closely matches an Eclipse-like directory layout. This enables us to seamlessly provide p2 initial provisioning support to all Virgo distributions. The documentation will be thoroughly updated with all changes and the configuration impact on the server.
 +
 
 +
The main differences are:
 +
 
 +
*relocated configuration folder(from /work/osgi/configuration to /configuration)
 +
*relocated lib/kernel folder(from /lib/kernel to /plugins)
 +
 
 +
This also brings changes to the OSGi configuration of the server previously found in lib/org.eclipse.virgo.kernel.launch.properties. It is now contained in the standard for Equinox config.ini file in the /configuration directory.
  
 
= Transformer Signature  =
 
= Transformer Signature  =
Line 10: Line 17:
  
 
  public void transform('''GraphNode'''<InstallArtifact> installGraph, InstallEnvironment installEnvironment) throws DeploymentException {
 
  public void transform('''GraphNode'''<InstallArtifact> installGraph, InstallEnvironment installEnvironment) throws DeploymentException {
    installGraph.visit(new ExceptionThrowing'''DirectedAcyclicGraph'''Visitor<InstallArtifact, DeploymentException>() {
+
  installGraph.visit(new ExceptionThrowing'''DirectedAcyclicGraph'''Visitor<InstallArtifact, DeploymentException>() {
 
+
        public boolean visit('''GraphNode'''<InstallArtifact> node) throws DeploymentException {
+
      public boolean visit('''GraphNode'''<InstallArtifact> node) throws DeploymentException {
                InstallArtifact installArtifact = node.getValue();
+
              InstallArtifact installArtifact = node.getValue();
                ...
+
              ...
        }
+
      }
    });
+
  });
 
  }
 
  }

Revision as of 05:51, 29 November 2011

Modified Directory Layout

Virgo's distributions will have a slightly modified directory layout from 3.5.0 onwards. It closely matches an Eclipse-like directory layout. This enables us to seamlessly provide p2 initial provisioning support to all Virgo distributions. The documentation will be thoroughly updated with all changes and the configuration impact on the server.

The main differences are:

  • relocated configuration folder(from /work/osgi/configuration to /configuration)
  • relocated lib/kernel folder(from /lib/kernel to /plugins)

This also brings changes to the OSGi configuration of the server previously found in lib/org.eclipse.virgo.kernel.launch.properties. It is now contained in the standard for Equinox config.ini file in the /configuration directory.

Transformer Signature

Transformer services in Virgo 3.5.0 operate in terms of a directed acyclic graph of install artefacts instead of the tree which was used by Virgo 3.0.x.

If you provide a Transformer service, you'll need to rework it to implement the modified signature. For example, the WebTransformer.transform method was changed as follows:

public void transform(GraphNode<InstallArtifact> installGraph, InstallEnvironment installEnvironment) throws DeploymentException {
 installGraph.visit(new ExceptionThrowingDirectedAcyclicGraphVisitor<InstallArtifact, DeploymentException>() {

     public boolean visit(GraphNode<InstallArtifact> node) throws DeploymentException {
             InstallArtifact installArtifact = node.getValue();
             ...
     }
 });
}