deployment to Geronimo 2.1?

9 messages Options
Embed this post
Permalink
Kristian Rink-2

deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
Folks;

not sure whether this is a known question but if so I missed at least
finding a response somewhere within the Jackrabbit wiki: Is there a
straightforward way of deploying Jackrabbit 1.5.6 to an Apache Geronimo 2.1
appserver? I'm not really sure where to look here, only figuring out that
the most "straightforward" way (deploying the jackrabbit .war file to
Geronimo) failed complaining about the absence of the javax.net.jcr API
packages (why aren't they part of the .war file by the way?), and placing
the jcr-1.0.jar somewhere within the Geronimo folder structure didn't change
anything about that...

Help, anyone? :)
TIA and all the best,
Kristian
Alexander Klimetschek

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
On Mon, Jul 6, 2009 at 8:22 PM, Kristian Rink<[hidden email]> wrote:

> Folks;
>
> not sure whether this is a known question but if so I missed at least
> finding a response somewhere within the Jackrabbit wiki: Is there a
> straightforward way of deploying Jackrabbit 1.5.6 to an Apache Geronimo 2.1
> appserver? I'm not really sure where to look here, only figuring out that
> the most "straightforward" way (deploying the jackrabbit .war file to
> Geronimo) failed complaining about the absence of the javax.net.jcr API
> packages (why aren't they part of the .war file by the way?), and placing
> the jcr-1.0.jar somewhere within the Geronimo folder structure didn't change
> anything about that...

The jcr-1.0.jar must be in the directory for jars that are shared by
all webapplications (don't know where this is on Geronimo). The reason
for this separation is that you typically want to access the
repository from different webapplications - or simply your
webapplication is accessing the repository contained within the
jackrabbit webapplication. Therefore the JCR API which is in the
jcr-1.0.jar must be shared by all.

Regards,
Alex

--
Alexander Klimetschek
[hidden email]
Kristian Rink-2

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
Hi Alexander, *;

and first off, thanks for your pointer on that...


Am Mon, 6 Jul 2009 22:43:58 +0200
schrieb Alexander Klimetschek <[hidden email]>:
[...]
> The jcr-1.0.jar must be in the directory for jars that are shared by
> all webapplications (don't know where this is on Geronimo). The reason
> for this separation is that you typically want to access the
> repository from different webapplications - or simply your
> webapplication is accessing the repository contained within the
> jackrabbit webapplication. Therefore the JCR API which is in the
> jcr-1.0.jar must be shared by all.

This way, at the very least I managed to deploy and run the
jackrabbit .war file on Geronimo 2.1. Good. :) However in some aspects
integration of jackrabbit with some arbitrary application server, even
after looking through the wiki resources, seems kind of "black art" to
me:

- On one side, given my client application is likely to run in the same
  container the jackrabbit does, of course I'd like to "locally"
  connect to the application server using a "Local repository access".
  Using the configuration outline for tomcat, I successfully managed to
  get this set-up working in a tomcat 6.0 container.

- On the other side however, I see that this way I am "missing" all the
  "additional" features provided by jackrabbit webapp (especially WebDAV
  and HTTP "browse" functionality which is pretty nice at the very
  least for debugging purposes).

So... is there some way of setting things up to have both - a globally
registered repository (and be that in tomcat as a start) _and_ the
additional features provided by jackrabbit webapp? Any documentation on
that I missed so far?

TIA and all the best,
Kristian
Alexander Klimetschek

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
On Thu, Jul 9, 2009 at 11:50 AM, Kristian Rink<[hidden email]> wrote:
> So... is there some way of setting things up to have both - a globally
> registered repository (and be that in tomcat as a start) _and_ the
> additional features provided by jackrabbit webapp? Any documentation on
> that I missed so far?

The jackrabbit-webapp registers the repository under JNDI under
"jcr/repository".

See these links

http://jackrabbit.apache.org/jcr-client-application-howto.html
http://jackrabbit.apache.org/shared-j2ee-resource-howto.html

Regards,
Alex

--
Alexander Klimetschek
[hidden email]
Kristian Rink-2

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
Am Thu, 9 Jul 2009 12:53:41 +0200
schrieb Alexander Klimetschek <[hidden email]>:

> On Thu, Jul 9, 2009 at 11:50 AM, Kristian Rink<[hidden email]>
> wrote:
> > So... is there some way of setting things up to have both - a
> > globally registered repository (and be that in tomcat as a start)
> > _and_ the additional features provided by jackrabbit webapp? Any
> > documentation on that I missed so far?
>
> The jackrabbit-webapp registers the repository under JNDI under
> "jcr/repository".

Does it register a global JNDI repository or just one for the
jackrabbit-webapp context? Reading ...

http://localhost:8080/jackrabbit/local.jsp 

I see something like

"[...]
By default the repository is only made available in a dummy JNDI
directory local to this web application. However, you can make the
repository globally available if your servlet container allows a web
application to modify the global JNDI directory or you are using some
other JNDI directory that can manage unserializable Java objects.
[...]"


which is why I came across this question initially. as my
~/jackrabbit/bootstrap.properties consequently has set something like

java.naming.factory.initial=org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory

which seems to fit that explanation...

Cheers,
Kristian
Alexander Klimetschek

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
On Thu, Jul 9, 2009 at 1:49 PM, Kristian Rink<[hidden email]> wrote:
> which is why I came across this question initially. as my
> ~/jackrabbit/bootstrap.properties consequently has set something like
>
> java.naming.factory.initial=org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory

http://jackrabbit.apache.org/shared-j2ee-resource-howto.html doesn't
do it for you?

Regards,
Alex

--
Alexander Klimetschek
[hidden email]
Kristian Rink-2

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
Am Thu, 9 Jul 2009 14:16:20 +0200
schrieb Alexander Klimetschek <[hidden email]>:

> On Thu, Jul 9, 2009 at 1:49 PM, Kristian Rink<[hidden email]>
> wrote:
> > which is why I came across this question initially. as my
> > ~/jackrabbit/bootstrap.properties consequently has set something
> > like
> >
> > java.naming.factory.initial=org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory
>
> http://jackrabbit.apache.org/shared-j2ee-resource-howto.html doesn't
> do it for you?

It does, but this way I don't have any of the features provided by
jackrabbit-webapp running in my container... Note that the howto (same
as most of the other documentation relating to this) refer to dumping
jackrabbit .jar files to the servlet container; I couldn't in there
find any reference to the jackrabbit-webapp .war deployment... Or am I
completely missing something here? :o

Cheers,
Kristian

Alexander Klimetschek

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
On Thu, Jul 9, 2009 at 2:42 PM, Kristian Rink<[hidden email]> wrote:
> It does, but this way I don't have any of the features provided by
> jackrabbit-webapp running in my container... Note that the howto (same
> as most of the other documentation relating to this) refer to dumping
> jackrabbit .jar files to the servlet container; I couldn't in there
> find any reference to the jackrabbit-webapp .war deployment... Or am I
> completely missing something here? :o

AFAIK it should work with the war as well.

Regards,
Alex

--
Alexander Klimetschek
[hidden email]
Kristian Rink-2

Re: deployment to Geronimo 2.1?

Reply Threaded More More options
Print post
Permalink
Alexander Klimetschek schrieb:
> On Thu, Jul 9, 2009 at 2:42 PM, Kristian Rink<[hidden email]> wrote:
>> It does, but this way I don't have any of the features provided by
>> jackrabbit-webapp running in my container... Note that the howto (same
>> as most of the other documentation relating to this) refer to dumping
>> jackrabbit .jar files to the servlet container; I couldn't in there
>> find any reference to the jackrabbit-webapp .war deployment... Or am I
>> completely missing something here? :o
>
> AFAIK it should work with the war as well.

Not sure about that:

- Just having the .war file deployed and adding the configuration entries to
server.xml and context.xml according to [1] ends up in an exception while
starting the container:

[...]
10.07.2009 08:22:14
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans
SCHWERWIEGEND: Exception processing Global JNDI Resources
javax.naming.NamingException: Could not load resource factory class [Root
exception is java.lang.ClassNotFoundException:
org.apache.jackrabbit.core.jndi.BindableRepositoryFactory]
        at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:81)
        at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
[...]


- Having both jackrabbit components in lib/, the configuration entries in
server.xml and context.xml _and_ the war package deployed to the container
results in the webapp context on startup complaining that the repository is
already locked...

Cheers,
Kristian



[1]http://jackrabbit.apache.org/shared-j2ee-resource-howto.html