migration from tomcat to jetty

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

migration from tomcat to jetty

mielniczu
hello

i want to migrate from tomcat (5.5) to jetty (6.1). in  tomcat\conf\Catalina\localhost\ i have configuration file mentioned below:

<Context displayName="libra" docBase="D:/libra/webapp/target/dist" path="/libra" reloadable="true">
<Resource name="jcr/repository"
          auth="Container"
          type="javax.jcr.Repository"
          factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
          configFilePath="D:/llibra/webapp/target/dist/WEB-INF/repository.xml"
          repHomeDir="C:/Documents and Settings/Administrator/.llibra/webapp-work/jcr"/>
</Context>

i configure 'docBase' and 'path' in that way:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
  <Set name="contextPath">/libra</Set>
  <Set name="resourceBase">D:/libra/webapp/target/dist</Set>
</Configure>

but what about Resource? i try this, but i know that is obviously wrong.

<New id="rabbit" class="org.mortbay.jetty.plus.naming.Resource">
  <Arg>jcr/globalRepository</Arg>
  <Arg>
    <New class="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory">
      <Set name="configFilePath">D:/libra/webapp/target/dist/WEB-INF/repository.xml</Set>
      <Set name="repHomeDir">C:/Documents and Settings/Administrator/.libra/webapp-work/jcr</Set>
    </New>
  </Arg>
</New>

Any idea?
Reply | Threaded
Open this post in threaded view
|

Re: migration from tomcat to jetty

jan_bartel
mielniczu,

Kinda disappointing that jackrabbit doesn't support creating a simple
pojo of their BindableRepository ...

Anway, given their jndi architecture, you have to do the following
(translate the java into jetty's straightforward java<->xml mapping):

Reference ref = new Reference("javax.jcr.Repository",
                              "org.apache.jackrabbit.core.jndi.BindableRepositoryFactory",
                               null);
ref.add(new StringRefAddr("configFilePath");
ref.add(new StringRefAddr("repHomeDir");

Resource = new Resource ("jcr/globalRepository", ref);

                               
regards
Jan


mielniczu wrote:

> hello
>
> i want to migrate from tomcat (5.5) to jetty (6.1). in
> tomcat\conf\Catalina\localhost\ i have configuration file mentioned below:
>
> <Context displayName="libra" docBase="D:/libra/webapp/target/dist"
> path="/libra" reloadable="true">
> <Resource name="jcr/repository"
>           auth="Container"
>           type="javax.jcr.Repository"
>          
> factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
>          
> configFilePath="D:/llibra/webapp/target/dist/WEB-INF/repository.xml"
>           repHomeDir="C:/Documents and
> Settings/Administrator/.llibra/webapp-work/jcr"/>
> </Context>
>
> i configure 'docBase' and 'path' in that way:
>
> <?xml version="1.0"  encoding="ISO-8859-1"?>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
> "http://jetty.mortbay.org/configure.dtd">
> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>   <Set name="contextPath">/libra</Set>
>   <Set name="resourceBase">D:/libra/webapp/target/dist</Set>
> </Configure>
>
> but what about Resource? i try this, but i know that is obviously wrong.
>
> <New id="rabbit" class="org.mortbay.jetty.plus.naming.Resource">
>   <Arg>jcr/globalRepository</Arg>
>   <Arg>
>     <New class="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory">
>       <Set
> name="configFilePath">D:/libra/webapp/target/dist/WEB-INF/repository.xml</Set>
>       <Set name="repHomeDir">C:/Documents and
> Settings/Administrator/.libra/webapp-work/jcr</Set>
>     </New>
>   </Arg>
> </New>
>
> Any idea?


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support