Community
Participate
Working Groups
Build Identifier: Eclipselink 2.4.0.v20120225-r10901 In the DWBS builder XML it is possible to specify which JNDI datasource the generated webservice should use at runtime. This doesn't allow multiple deployments of the same webservice for different databases. In case a resource reference is defined on a webservice, on can deploy it the first time for a development database, the second time for a test database, ... by providing each time the specific JNDI datasource for the resource. For WebLogic e.g. the result of the generation would be a web.xml like this: <?xml version="1.0"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <listener> <listener-class>_dbws.ProviderListener</listener-class> </listener> <servlet> <servlet-name>_dbws.DBWSProvider</servlet-name> <servlet-class>_dbws.DBWSProvider</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>_dbws.DBWSProvider</servlet-name> <url-pattern>/BobWebservice</url-pattern> </servlet-mapping> <resource-ref> <description>Resource for a datasource (to be specified on deployment)</description> <res-ref-name>jdbc/bobDS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </web-app> Reproducible: Always
This is something we could support in a future release, as although it seems like a trivial change, would require changes to our schema, builder model project, etc. Setting Target Milestone to future.
In addition, for the runtime we will need to make changes to how we configure the EclipseLink Session such that it looks up the resource properly.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink