This is what I have been trying:
- Using configuration.xml file added to a jar. Java class implementing
startable and using the constructor to manage the dependencies. This
works but only if the archive is deployed when the server is started.
This doesn't work if the jar/war gets deployed after the server is
started, or if the archive is removed while the server is still running.
- Adding a configuration.xml file to the WEB-INF/conf directory doesn't
seem to do anything unless its setup to be a portal extension.
- Using a servlet or servletcontextlistener. If I use a java class to
access the PortalContainer (eg
PortalContainer.getInstance().getComponentInstance). This will work if
the app is deployed after the portal is fully started, but it will not
work if the app is deployed when the server is starting. During startup
the servlet/servletcontextlistener will be started before the kernel
services are loaded, which results in null objects. Server shutdown has
the same problem.
I am missing some step here to get this to work properly? Do I need to
hook into some init process for the kernel?
On Tue, 2010-08-31 at 10:16 +0200, Nicolas Filotto wrote:
Hi,
my comments inline
On Mon, Aug 30, 2010 at 8:59 PM, Matt Wringe <mwringe(a)redhat.com>
wrote:
Where exactly should we be looking for the documentation for
exo kernel?
The documentation of the kernel is shipped with the documentation of
eXo JCR that you can find here
http://jboss.org/exojcr/documentation.html
I know there is some in the reference guide, but there is also
documentation on the exoplatform wiki.
The doc of the latest version of the kernel is indeed in the reference
guide of eXo JCR
(
http://docs.jboss.org/exojcr/1.12.3-GA/reference/en-US/html/part-kernel.html). The wiki
was needed before we ported the whole doc into docbook, since now we ported everything,
the official and unique doc is the reference guide.
All I want to be able to do is to access a service in the
portal during
the deployment of an application. But configuration.xml files
only
appear to be used when the server is first started, and if I
access the
kernel directly in java (ie PortalContainer.getInstance) there
doesn't
appear to be any way to guarantee that the dependent service
is running
yet.
In eXo JCR, the components are first initialized i.e the instances are
created following the dependency order (remember that components are
injected by constructor) then the components that implement the
interface org.picocontainer.Startable will be started following the
dependency order.
In your case, what is your component? when do you want interact with
it (before creating it, after it has been created, before it is
started -if it implements Startable- or after it is started)?
_______________________________________________
gatein-dev mailing list
gatein-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev
--
Nicolas Filotto
JCR Product Manager
eXo Platform SAS
nicolas.filotto(a)exoplatform.com
+33 (0)6 31 32 92 19