french english

RSS 1.0 
 
 Login 
 Password 
 Créer un compte 
 
09-02-09 / 02:18 : CP2JavaWS 0.31 dispo (cjed)
Une nouvelle version - 0.31 - de CP2JavaWS est disponble sur sourceforge. Elle inclut les modifications suivantes :

- CP2JavaWSJSONServlet has been replaced by a filter. Then no need anymore for a servlet. If a servlet is still present, your application could then manage both JSON requests (originated from Cappuccino client applications using CP2JavaWSRemoteService proxy), through the CPJSONFilter, and classic web requests (managed by your servlet, Struts or Spring MVC servlet for example).

- the CPJSONFilter can work with any service factory (custom framework and/or IOC container). A listener is provided for integration with spring container (see the provided demo). You have then to add cp2javaws-springsupport.jar in web-inf/lib besides cp2javaws-filter.jar (and spring.jar obviously). If not using Spring, spring.jar (and cp2javaws-springsupport.jar) can be removed, avoiding any dependency.

- for custom service factory/framework, a listener example is provided (see server source code, DummyContextWrapperListener.java and DummyContextWrapper.java). Just modify these classes to get you service factory injected, and then export these two classes into a support.jar (the same as with cp2javaws-springsupport.jar).

- fixed date timezone management.
Commentaires
I initially planned not to use a cp2javaws SpringContextWrapperListener, by instead injecting the spring context in a contextHolder singleton object (that would implements Spring's contextAware interface). Then no additional listener in the web.xml, only the CPJSONFilter with an init parameter specifying the context holder singleton class (and Method reflection to get it from the generic filter). But it would require for the context holder singleton to be declared in the Spring managed beans. Moreover, for other frameworks/containers to work, they would need to allow some basic static initialization (if not providing such injection), as the context holder singleton won't get access to the servlet context (available only from the current listeners).
(posté le 09/02/09 à 11:38 par cjed)
Poster un commentaire 
  
    
  image de securisation du formulaire


  
      (sera ajouté après validation)