This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 375558 - DBWS: Builder XML doesn't allow to specify a resource instead of a JNDI datasource
Summary: DBWS: Builder XML doesn't allow to specify a resource instead of a JNDI datas...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-28 12:24 EDT by Jan Smets CLA
Modified: 2022-06-09 10:35 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Smets CLA 2012-03-28 12:24:01 EDT
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
Comment 1 David McCann CLA 2012-03-29 11:22:59 EDT
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.
Comment 2 David McCann CLA 2012-03-29 12:52:42 EDT
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.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:40 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:35:05 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink