users@grizzly.java.net

Re: Automatically publishing all JAX-WS annotated web services found on classpath when using standalone grizzly

From: Leo Romanoff <romixlev_at_yahoo.com>
Date: Wed, 22 Dec 2010 10:10:40 -0800 (PST)

Hi Alexey,

Thanks for your reply.

> IMO the annotation usecase needs deeper investigation, so I'm not sure
> JSR109 type of deployment will work as it is.
> Though, as you have mentioned the JAX-WS servlet type of deployment
> should work, but for sure you need to provide web services descriptor
> files.

Just to make it clear. I'd like to avoid using complete WAR/EAR files with
all the descriptor files and the like. This would probably require the whole
J2EE container to be supported properly.

I'd really like to be able to put all my annotated JAX-WS services e.g into
JARs without any further archives and descriptors around them and let the
JAX-WS runtime and grizzly components (e.g. grizzly-servlet-webserver or
something else) find out these JAX-WS-annotated classes inside those JARs
and publish them. This is exactly how Jersey works on top of Grizzly. You
just tell it where to look for your annotated JAX-RS classes and it does the
REST ;-)

Thanks,
  -Leo


Oleksiy Stashok-2 wrote:
>
> Hi Leo,
>
> IMO the annotation usecase needs deeper investigation, so I'm not sure
> JSR109 type of deployment will work as it is.
> Though, as you have mentioned the JAX-WS servlet type of deployment
> should work, but for sure you need to provide web services descriptor
> files.
>
> Thanks.
>
> WBR,
> Alexey.
>
>> I'm wondering if it is somehow possible to tell jax-ws to publish
>> all the
>> annotated JAX-WS services found on the (specified) classpath. So
>> far, I've seen
>> this implemented only for J2EE apps, where during JAR/WAR
>> deployments, the
>> application server would scan the archives, find all annotated
>> services and
>> publish them.
>>
>> But I'm very interested in doing that when using JAX-WS together with
>> grizzly-servlet-webserver and grizzly SPI for JAX-WS.
>>
>> Jersey's JAX-RS implementation when used with grizzly-servlet-
>> webserver and
>> jersey-server can easily find and provision all annotated JAX-RS
>> services, e.g.
>>
>> GrizzlyWebServer server;
>> server = new GrizzlyWebServer(port);
>>
>> ServletAdapter jersey = new ServletAdapter();
>> jersey.setServletInstance(new ServletContainer());
>>
>> // Tell jersey where to find REST resources
>> // It would scan all classes on this classpath and
>> find all
>> annotated services
>>
>> jersey.addInitParameter(ClasspathResourceConfig.PROPERTY_CLASSPATH,
>> "my.jar");
>>
>> jersey.setServletPath("/path");
>>
>> // Tell grizzly to serve our REST service
>> server.addGrizzlyAdapter(jersey, new String[] { "/
>> path" });
>> try {
>> server.start();
>> } catch (IOException e) {
>> e.printStackTrace();
>> }
>>
>> So, would it be possible to do something similar using JAX-WS (with
>> Grizzly
>> support) as well?
>>
>> Thanks,
>> Leo
>>
>>
>>
>
>
>

-- 
View this message in context: http://old.nabble.com/Automatically-publishing-all-JAX-WS-annotated-web-services-found-on-classpath-when-using-standalone-grizzly-tp30513769p30516249.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.