<div dir="ltr">Hi,<div><br></div><div>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</div>

<div><br></div><div>BR,</div><div>Nicolas</div>















































</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 8, 2013 at 12:22 PM, Juraci Paixão Kröhling <span dir="ltr">&lt;<a href="mailto:jcosta@redhat.com" target="_blank">jcosta@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">All,<br>
<br>
I&#39;m currently working on GTNPORTAL-3281 [1], and I have a question.<br>
<br>
The WARN message on the logs occurs during the shutdown of the server,<br>
when the method WSRPServiceIntegration.stop() is called. During this<br>
stop() method, both producer and consumers are then requested to be<br>
stopped, but the configuration for the producer and the list of<br>
consumers requires access to the workspace, which is already shut down,<br>
as RepositoryContainer is stopped before WSRPServiceIntegration.<br>
<br>
While stopping the producer is possible without requesting the workspace<br>
to be active, shutting down the consumers currently require a fresh list<br>
of consumers, which in turn requires access to the workspace.<br>
<br>
When looking into why WSRPServiceIntegration is stopped after<br>
RepositoryContainer, I noticed that the list of services to start during<br>
the boot contains 36 items, while the shutdown contains 37. The<br>
difference is exactly the RepositoryContainer.<br>
<br>
So, does anyone knows if it is appropriate for RepositoryContainer to be<br>
stopped before everything else, including WSRPServiceIntegration? If<br>
not, I would then look for the place where RepositoryContainer is added<br>
and add it to the head of the list, instead of appending it (this means<br>
that RepositoryContainer will be the last thing to be stopped, instead<br>
of the first, as it currently is).<br>
<br>
If RepositoryContainer should indeed be the first thing to be shut down,<br>
then the solution that I can see is to get the cached list of consumers,<br>
instead of getting a fresh one. This should remove the requirement of<br>
the workspace to exist during the shutdown of WSRPServiceIntegration.<br>
<br>
1 - <a href="https://issues.jboss.org/browse/GTNPORTAL-3281" target="_blank">https://issues.jboss.org/browse/GTNPORTAL-3281</a><br>
<br>
Thanks!<br>
Juca.<br>
_______________________________________________<br>
gatein-dev mailing list<br>
<a href="mailto:gatein-dev@lists.jboss.org">gatein-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/gatein-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/gatein-dev</a><br>
</blockquote></div><br></div>