users@glassfish.java.net

Re: JaxRS/RestEasy

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 14 Dec 2009 14:34:38 +0100

Hi Dominik,

Unfortunately it is not really possible to have two different
implementations of JAX-RS running from within the same non-isolated VM.

In your web app before the JAX-RS API is utilized *by any other web
app* might be possible to do the following:

   javax.ws.rs.ext.RuntimeDelegate.setInstance(new
org.jboss.resteasy.spi.ResteasyProviderFactory());

but this will break any other Web apps that utilize Jersey.

Alternatively it should be possible to remove Jersey using the update
center.

Paul.

On Dec 12, 2009, at 6:10 PM, Dominik Dorn wrote:

> Hi,
>
> I'm trying to deploy scrumshark/socialPM to glassfish, but it does
> not work, because it is using RestEasy
> and that makes problems with the build-in jaxrs implementation jersey.
>
> Please see the attached file for the stacktrace.
>
> The web.xml looks like this:
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
> "
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
> "
> id="WebApp_ID" version="2.5">
> <display-name>socialpm-ws</display-name>
>
> <session-config>
> <session-timeout>400</session-timeout>
> </session-config>
>
> <context-param>
> <description>Define Spring context files to load when this
> app starts up</description>
> <param-name>contextConfigLocation</param-name>
> <param-value>
> classpath:/applicationContext.xml
> classpath:/applicationContext-data-mysql.xml
> classpath:/applicationContext-security.xml
> </param-value>
> </context-param>
>
>
> <listener>
> <listener-class>
>
> org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</
> listener-class>
> </listener>
>
> <listener>
> <listener-class>
>
> org.jboss.resteasy.plugins.spring.SpringContextLoaderListener</
> listener-class>
> </listener>
>
> <servlet>
> <servlet-name>Resteasy</servlet-name>
> <servlet-class>
>
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</
> servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>Resteasy</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
>
>
> <filter>
> <filter-name>springSecurityFilterChain</filter-name>
> <filter-class>org.springframework.web.filter.DelegatingFilterProxy
> </filter-class>
> </filter>
> <filter-mapping>
> <filter-name>springSecurityFilterChain</filter-name>
> <url-pattern>/*</url-pattern>
> <dispatcher>FORWARD</dispatcher>
> <dispatcher>REQUEST</dispatcher>
> </filter-mapping>
>
> </web-app>
>
>
> is there a way I can disable the jersey jaxrs implementation for one
> webapp?
> Or are there alternatives?
>
>
> Thanks,
> Dominik Dorn
>
> P.s.: This is also reported at http://code.google.com/p/ocpsoft-tools/issues/detail?id=3
>
>
> <
> stacktrace
> .txt
> >---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net