[gatein-dev] RepositoryContainer as the first thing to stop during shutdown

Nicolas Filotto nicolas.filotto at exoplatform.com
Mon Nov 11 03:33:25 EST 2013


Hi,

RepositoryContainer and Workspace containers are created, initialized and
started by the RepositoryService. Try to add explicitly the
RepositoryService in your constructor, this way your component should be
started after the RepositoryService (and the RepositoryContainer) and will
be stopped before the RepositoryService. Another solution would be to check
the state of the repository first using
RepositoryService.getCurrentRepository().getState() (warning it is not a
static call, the goal is only to show you the methods to call), you need to
make that the value is ManageableRepository.ONLINE

BR,
Nicolas


On Fri, Nov 8, 2013 at 12:22 PM, Juraci Paixão Kröhling
<jcosta at redhat.com>wrote:

> All,
>
> I'm currently working on GTNPORTAL-3281 [1], and I have a question.
>
> The WARN message on the logs occurs during the shutdown of the server,
> when the method WSRPServiceIntegration.stop() is called. During this
> stop() method, both producer and consumers are then requested to be
> stopped, but the configuration for the producer and the list of
> consumers requires access to the workspace, which is already shut down,
> as RepositoryContainer is stopped before WSRPServiceIntegration.
>
> While stopping the producer is possible without requesting the workspace
> to be active, shutting down the consumers currently require a fresh list
> of consumers, which in turn requires access to the workspace.
>
> When looking into why WSRPServiceIntegration is stopped after
> RepositoryContainer, I noticed that the list of services to start during
> the boot contains 36 items, while the shutdown contains 37. The
> difference is exactly the RepositoryContainer.
>
> So, does anyone knows if it is appropriate for RepositoryContainer to be
> stopped before everything else, including WSRPServiceIntegration? If
> not, I would then look for the place where RepositoryContainer is added
> and add it to the head of the list, instead of appending it (this means
> that RepositoryContainer will be the last thing to be stopped, instead
> of the first, as it currently is).
>
> If RepositoryContainer should indeed be the first thing to be shut down,
> then the solution that I can see is to get the cached list of consumers,
> instead of getting a fresh one. This should remove the requirement of
> the workspace to exist during the shutdown of WSRPServiceIntegration.
>
> 1 - https://issues.jboss.org/browse/GTNPORTAL-3281
>
> Thanks!
> Juca.
> _______________________________________________
> gatein-dev mailing list
> gatein-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/gatein-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/gatein-dev/attachments/20131111/ea5367c6/attachment.html 


More information about the gatein-dev mailing list