This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 71092 - Working with the data sources
Summary: Working with the data sources
Status: RESOLVED DUPLICATE of bug 71093
Alias: None
Product: serverplugins
Classification: Unclassified
Component: JBoss (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Libor Kotouc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-06 14:42 UTC by Libor Kotouc
Modified: 2006-06-04 23:44 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Libor Kotouc 2006-01-06 14:42:10 UTC
There is a need to define the datasource when a user wants to use some
enterprise resources, e.g. 'Use Database'.

There are basically two parts:
1. create a data source within the project's target server (if it is not there
already)
2. bind the server-specific deployment descriptor with this data source

It will vary for the web and EJB project, AFAIK at least the server-specific
descriptors are different but the mechanism stays same.

The question is which use cases will be involved in addition to 'Use Database'
on the Servlet. One possibility is when a user imports or creates an entity
bean, but I don't know now whether there will be implemented for EJB3.0 only or
whether it will work also for EJB2.1 (if there is a difference at all).

add 1. 
A. We will need to detect the DS existence. The datasource can be defined in a
separate XML file in the deploy subdirectory (JBoss uses a convention
<db-type>-ds.xml) but it is probably possible to add the definition into an
existing file, e.g. to some other data source definition. It can be perhaps
placed under another directory then deploy.
So, one way is to use some file searching heuristic to find the data source.
Another way is to use JMX interface, I must to explore it a little bit to find
out some good mechanism - the most reliable way could be finding the database
driver in the DS with the same name as a project generates.

B. Another problem is when the data source should be deployed (by copying in
fact), whether immediatelly after its creation or during a project deploy.
Comment 1 Libor Kotouc 2006-01-06 14:46:29 UTC
Created by a mistake.

*** This issue has been marked as a duplicate of 71093 ***