Difference between revisions of "Migration Guidelines from 0.5.1 to 0.6"
From GCube System
(→Changes Related to Configuration and Use of the gHN) |
(→Changes Related to the Implementation of Services) |
||
Line 8: | Line 8: | ||
==== Changes Related to the Implementation of Services ==== | ==== Changes Related to the Implementation of Services ==== | ||
− | |||
− | |||
+ | :* ''New interfaces and implementations for resource publication.'' | ||
+ | ::The interface <code>ISPublisher</code> in <code>org.gcube.common.core.informationsystem.publisher</code> is now extended by <code>ISSyncPublisher</code> and <code>ISASyncPublisher</code> interfaces, in the same package. These are tagging interfaces that implicitly impose synchronous and asynchronous behaviour on their implementations, respectively. The default implementation of <code>ISPublisher</code> is the default implementation of <code>ISAsyncPublisher</code>. This means that existing code retains its current semantics. Interface implementations are obtained though standard means: | ||
+ | |||
+ | <source lang="java"> | ||
+ | ISSyncPublisher sp = GHNContext.getImplementation(ISSyncPublisher.class); //obtains a publisher for synchronous publication | ||
+ | ISASyncPublisher ap = GHNContext.getImplementation(ISASyncPublisher.class); //obtains a publisher for asynchronous publication | ||
+ | ISPublisher p = GHNContext.getImplementation(ISPublisher.class); //also obtains a publisher for asynchronous publication | ||
+ | </source> | ||
+ | |||
+ | :* <code>org.gcube.common.core.state.GCUBEWSResource</code> has a new method <code>getPublisher()</code> that returns the implementation of <code>ISPublisher</code> used for the publication of WS-Resources. The method returns the default implementation of <code>ISPublisher</code>, which is an asynchronous publisher (see above). Developers can override it to return the implementations of specific publishers, as shown below: | ||
+ | |||
+ | <source lang="java"> | ||
+ | /**{@inheritDoc}*/ | ||
+ | protected ISPublisher getPublisher() throws Exception { | ||
+ | return GHNContext.getImplementation(ISSyncPublisher.class); //forces a synchronous publisher | ||
+ | } | ||
+ | </source> | ||
==== Changes Related to the Resource Profiles ==== | ==== Changes Related to the Resource Profiles ==== |
Revision as of 11:31, 28 October 2009
gCore 0.6
requires or supports the following changes to practices and service implementations that are compliant with gCore 0.5.1
(non retro-compatible changes are typeset in bold):
Changes Related to Configuration and Use of the gHN
- debugging and profiling launch scripts.
- The are two new scripts in
$GLOBUS_LOCATION/bin
,gcore-start-container-debug
andgcore-start-container-profile
, to start the gHN in debugging and profiling mode, respectively. See the Primer for detailed usage instructions.
Changes Related to the Implementation of Services
- New interfaces and implementations for resource publication.
- The interface
ISPublisher
inorg.gcube.common.core.informationsystem.publisher
is now extended byISSyncPublisher
andISASyncPublisher
interfaces, in the same package. These are tagging interfaces that implicitly impose synchronous and asynchronous behaviour on their implementations, respectively. The default implementation ofISPublisher
is the default implementation ofISAsyncPublisher
. This means that existing code retains its current semantics. Interface implementations are obtained though standard means:
ISSyncPublisher sp = GHNContext.getImplementation(ISSyncPublisher.class); //obtains a publisher for synchronous publication ISASyncPublisher ap = GHNContext.getImplementation(ISASyncPublisher.class); //obtains a publisher for asynchronous publication ISPublisher p = GHNContext.getImplementation(ISPublisher.class); //also obtains a publisher for asynchronous publication
-
org.gcube.common.core.state.GCUBEWSResource
has a new methodgetPublisher()
that returns the implementation ofISPublisher
used for the publication of WS-Resources. The method returns the default implementation ofISPublisher
, which is an asynchronous publisher (see above). Developers can override it to return the implementations of specific publishers, as shown below:
-
/**{@inheritDoc}*/ protected ISPublisher getPublisher() throws Exception { return GHNContext.getImplementation(ISSyncPublisher.class); //forces a synchronous publisher }
Changes Related to the Resource Profiles
- TODO.
- TODO.