Difference between revisions of "Virgo/Community/Migrating from dm Server"

From Eclipsepedia

Jump to: navigation, search
(Service Wrapper)
 
(2 intermediate revisions by one user not shown)
Line 9: Line 9:
  
 
Some of these packages are more likely than others to be used by applications. For example, the following web configuration:  
 
Some of these packages are more likely than others to be used by applications. For example, the following web configuration:  
<pre>&lt;context-param&gt;  
+
 
 +
&lt;context-param&gt;  
 
     &lt;param-name&gt;contextClass&lt;/param-name&gt;
 
     &lt;param-name&gt;contextClass&lt;/param-name&gt;
     &lt;param-value&gt;com.springsource.server.web.dm.ServerOsgiBundleXmlWebApplicationContext&lt;/param-value&gt;
+
     &lt;param-value&gt;'''com.springsource.server'''.web.dm.ServerOsgiBundleXmlWebApplicationContext&lt;/param-value&gt;
&lt;/context-param&gt;  
+
&lt;/context-param&gt;  
</pre>
+
 
 
needs to be changed to:  
 
needs to be changed to:  
<pre>&lt;context-param&gt;  
+
 
 +
&lt;context-param&gt;  
 
     &lt;param-name&gt;contextClass&lt;/param-name&gt;
 
     &lt;param-name&gt;contextClass&lt;/param-name&gt;
     &lt;param-value&gt;org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext&lt;/param-value&gt;
+
     &lt;param-value&gt;'''org.eclipse.virgo'''.web.dm.ServerOsgiBundleXmlWebApplicationContext&lt;/param-value&gt;
&lt;/context-param&gt;  
+
&lt;/context-param&gt;  
</pre>
+
 
 
The main package changes are shown in the following table although very few of these are likely to impact applications. Users who have modified or extended dm Server are far more likely to be affected.  
 
The main package changes are shown in the following table although very few of these are likely to impact applications. Users who have modified or extended dm Server are far more likely to be affected.  
  
Line 78: Line 80:
  
 
The service wrapper did not make it through the stringent Eclipse IP process and so is no longer supported. Anyone needing this function will need to create their own service wrapper or, at their own risk, take the one from dm Server 2.0.x and doctor it.
 
The service wrapper did not make it through the stringent Eclipse IP process and so is no longer supported. Anyone needing this function will need to create their own service wrapper or, at their own risk, take the one from dm Server 2.0.x and doctor it.
 +
 +
Brian Williamson has [http://www.eclipse.org/forums/index.php?t=rview&goto=1030718#msg_1030718 made available] a [https://bitbucket.org/brianw13a/org.eclipse.virgo.daemon Virgo service wrapper] based on [http://commons.apache.org/proper/commons-daemon/ Apache Commons Daemon].
  
 
=== Web Application Bundles Default Headers ===
 
=== Web Application Bundles Default Headers ===

Latest revision as of 11:25, 9 April 2013

[edit] Migrating from dm Server 2.0.x to Virgo 2.1.0.x

The following changes in Virgo 2.1.0.x affect users migrating from dm Server 2.0.x:

[edit] Package Names

The Java package names of the code have been renamed from com.springsource or org.eclipse.

Some of these packages are more likely than others to be used by applications. For example, the following web configuration:

<context-param> 
   <param-name>contextClass</param-name>
   <param-value>com.springsource.server.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</context-param> 

needs to be changed to:

<context-param> 
   <param-name>contextClass</param-name>
   <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</context-param> 

The main package changes are shown in the following table although very few of these are likely to impact applications. Users who have modified or extended dm Server are far more likely to be affected.


Package changes
dm Server 2.0.x Virgo 2.1.0.x
com.springsource.osgi.teststubs.* org.eclipse.virgo.teststubs.osgi.*
com.springsource.osgi.extensions.* org.eclipse.virgo.osgi.extensions.*
com.springsource.osgi.launcher.* org.eclipse.virgo.osgi.launcher.*
com.springsource.util.* org.eclipse.virgo.util.*
com.springsource.osgi.test.* org.eclipse.virgo.test.*
com.springsource.osgi.medic.* org.eclipse.virgo.medic.*
com.springsource.repository.* org.eclipse.virgo.repository.*
com.springsource.kernel.* org.eclipse.virgo.kernel.*
com.springsource.osgi.webcontainer.* org.eclipse.gemini.web.*
com.springsource.server.* org.eclipse.virgo.*

[edit] Service Properties

The service property which is used to control the scope of publication of a service is renamed from com.springsource.service.scope to org.eclipse.virgo.service.scope. The name com.springsource.service.scope is tolerated as a synonym of org.eclipse.virgo.service.scope for the 2.1.0 release but this behaviour may be dropped in a future release and a warning event log message is issued.

[edit] Shell

The kernel shell did not make it through the stringent Eclipse IP process and so Virgo extends the Equinox console instead.

The inline shell is no longer supported and the "-shell" switch on the startup script produces a warning.

The Equinox console is configured in the user region properties file via the osgi.console property with a default value of 2401.

The kernel properties shell.enabled and shell.port are no longer used and are ignored if specified. Remote access to the Equinox console is via telnet (whereas the kernel shell supported ssh).

[edit] Service Wrapper

The service wrapper did not make it through the stringent Eclipse IP process and so is no longer supported. Anyone needing this function will need to create their own service wrapper or, at their own risk, take the one from dm Server 2.0.x and doctor it.

Brian Williamson has made available a Virgo service wrapper based on Apache Commons Daemon.

[edit] Web Application Bundles Default Headers

As described in the Known Issues section of the Virgo Programmer Guide, Virgo defaults certain headers of Web Application Bundles (WABs) in a manner consistent with that of dm Server 2.0.x instead of conforming strictly to the OSGi Web Applications specification. This behaviour may be dropped after 2.1.x and so WABs should be modified to set these headers to the required values.

[edit] Hibernate Resolution Issue

When migrating Hibernate applications from dm Server to Virgo, it is likely that the Hibernate EJB fragment bundle will need upgrading. The symptoms are that the application will fail to resolve due to missing imports of packages such as org.hibernate.ejb.transaction. See bug 335174 for details.

The Hibernate EJB fragment bundle com.springsource.org.hibernate.ejb v3.4.0.GA in the SpringSource Enterprise Bundle Repository depends on the package org.slf4j with a version range that excludes the version of the package provided with Virgo. The net effect is that Hibernate EJB fragment bundle fails to attach to its host com.springsource.org.hibernate and the host then does not export the packages the application may need, such as org.hibernate.ejb.transaction.

An updated Hibernate EJB fragment with version 3.4.0.GA-A which fixes this problem is available from the SpringSource Enterprise Bundle Repository.