Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 12162

Re: Integrating Jersey (JAX-RS) with Openfire

$
0
0

Openfire plugins have a problem when declare servlets, you can't set init-params in the web.xml, if you see the code of the open fire when the PluginServlet generate the other servlets you can see the following:

 

if (instance instanceof GenericServlet) {

                    // Initialize the servlet then add it to the map..

                    ((GenericServlet)instance).init(servletConfig);

                    servlets.put(pluginName + url, (GenericServlet)instance);

                }

 

As you can see, the servlet is initialized with the config of the plugin servlet, so you can't put in your web-custom.xml the following information:

 

<init-param>

        <param-name>jersey.config.server.provider.packages</param-name>

        <param-value>com.mypackage</param-value>          

    </init-param> 

 

Due to the package is never scanned so really you don't have your services enabled.

 

At least I think that that is the problem, you can solved this issue configuring your jersey in the same way that this post:

 

http://community.igniterealtime.org/thread/41996

 

or

 

http://brownydev.blogspot.com.es/2013/06/deploy-jersey-in-openfire-plugin.html

 

I hope that helps.


Viewing all articles
Browse latest Browse all 12162

Trending Articles