jax-ws on glassfish3 init method

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-03-30T12:05:47Z Indexed on 2010/03/30 12:53 UTC
Read the original article Hit count: 707

Filed under:
|
|
|

Hi all,

I've created simple jax-ws (anotated Java 6 class to web service) service and deploied it on glassfish v3. The web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<servlet>
  <servlet-name>MyServiceName</servlet-name>
  <description>Blablabla</description>
  <servlet-class>com.foo-bar.somepackage.TheService</servlet-class>
  <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>MyServiceName</servlet-name>
  <url-pattern>/MyServiceName</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>

There is no sun-jaxws.xml in the war. The service works fine but I have 2 issues: I'm using apache common configuration package to read my configuration, so i have init function that calls configuration stuff. 1. How can I configure init method for jaxws service (like i can do for the servlets for example) 2. the load on startup parameter is not affecting the service, I see that for every request init function called again (and c-tor). How can I set scope for my service?

Thanks a lot,

© Stack Overflow or respective owner

Related posts about java

Related posts about jaxws