[Bug 215480] can't create entity classes from XA data source

  • From:
  • To:
  • Subject: [Bug 215480] can't create entity classes from XA data source
  • Date: Thu, 06 Dec 2012 16:41:11 +0000
  • Auto-submitted: auto-generated

http://netbeans.org/bugzilla/show_bug.cgi?id=215480

--- Comment #2 from 

 2012-12-06 16:41:11 UTC ---
Created attachment 128993
  --> http://netbeans.org/bugzilla/attachment.cgi?id=128993
Patch

The problem is that org.postgresql.xa.PGXADataSource does not implement
interface java.sql.Driver. DataSource is not a Driver. GlassFish can use it,
but NetBeans not.

So the solution is not trivial. Possibilities are:

1) Try to find a driver class when a DataSource class is specified in driver
   properties (create driver dialog).
   See the attached patch. This is not optimal, as you have to register 
   a new driver, which in fact uses another driver class than specified.
   But it needs to be there to match the GlassFish JDBC resource.

   Maybe this should be handled in Persistence module rather than in DB 
module.

2) Only show JDBC resources that specify Drivers, not DataSources. This would
   probably end up in forcing users to create another JDBC resources that use
   Drivers instead of DataSources. So, again, you need to register something
   extra to make the functionality work.

3) Search all registered JARs, find which of them contains the DataSource
class,
   and use Driver contained in that JAR. This could be quite expensive and 
   seems to be an overkill.

Sergey, what do you think?

-- 
Configure bugmail: http://netbeans.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


[Bug 215480] can't create entity classes from XA data source

jhavlin 12/06/2012

<Possible follow-up(s)>

[Bug 215480] can't create entity classes from XA data source

pjiricka 12/06/2012

[Bug 215480] can't create entity classes from XA data source

sj-nb 12/06/2012

[Bug 215480] can't create entity classes from XA data source

sj-nb 12/06/2012

[Bug 215480] can't create entity classes from XA data source

jhavlin 12/07/2012

[Bug 215480] can't create entity classes from XA data source

sj-nb 12/07/2012

[Bug 215480] can't create entity classes from XA data source

jhavlin 12/07/2012

[Bug 215480] can't create entity classes from XA data source

sj-nb 12/09/2012

[Bug 215480] can't create entity classes from XA data source

jhavlin 12/10/2012

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close