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 91784 - Add new project type for Java Connector Architecture / JCA
Summary: Add new project type for Java Connector Architecture / JCA
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 6 votes (vote)
Assignee: issues@javaee
URL:
Keywords:
: 57999 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-03 20:32 UTC by rdelaplante
Modified: 2016-07-07 13:23 UTC (History)
5 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
zip file with connector example (321.79 KB, application/x-zip-compressed)
2011-08-29 21:07 UTC, chaase3
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rdelaplante 2007-01-03 20:32:45 UTC
1) Build outputs .rar instead of .jar

2) Visual deployment descriptor editor for ra.xml, and application server
specific deployment descriptors

3) Ability to include libraries in the .rar file automatically when doing a build

Plus any other useful features to help develop, test and deploy resource adapters.
Comment 1 Vince Kraemer 2007-06-08 01:27:52 UTC
*** Issue 57999 has been marked as a duplicate of this issue. ***
Comment 2 rdelaplante 2007-08-28 03:23:20 UTC
There is now a plugin under development for this:

https://nbconnector.dev.java.net/
Comment 3 chase 2009-09-30 20:05:03 UTC
Still applies to 6.8.

The website for that plug-in can't be reached.

Maybe some stuff from Java CAPS can be borrowed since I know they have some RA functionality.
Comment 4 puce 2010-05-11 13:50:15 UTC
+1

I changed the product to 'javaee', which is probabaly a better fit. Feel free to change it again, if you think otherwise.
Comment 5 rdelaplante 2010-05-11 13:56:48 UTC
I'm currently using Maven for building a JCA connector.  There are three projects: one for the java classes (jar), one for rar packaging, and one parent of both projects.

Maybe you could build some type of GUI for Maven based JCA projects.  I remember having difficulty building the deployment descriptor because my book was on pre-1.5, but I was building for 1.5.  So the editor needs to at least provide schema validation.
Comment 6 chazware 2010-06-17 14:04:04 UTC
I am trying to build a JCA that is dependent on the Teiid 7 JCA for JBoss.  This project wizard would be very helpful for this and future projects.
Comment 7 David Konecny 2010-11-08 20:21:02 UTC
I'm sorry to disappoint you guys but NetBeans EE team does not have resources to implement support for JCA (in long term). I'm happy to provide any knowhow or help if somebody from community decided to provide this support.
Comment 8 puce 2010-11-11 11:53:35 UTC
This is really bad news.

JCA is part of the official Java EE specification and NetBeans, which is targeted at the official specifications, should really support this.

I also didn't find much good documentation about this topic, so IDE support would be much appreciated.
Comment 9 David Konecny 2010-11-11 20:50:52 UTC
(In reply to comment #8)
> JCA is part of the official Java EE specification and NetBeans, which is
> targeted at the official specifications, should really support this.

In theory I agree. In practice you have limited number of resources and vast EE specification. So it's compromise, we cannot provide good quality support for everything and something has to be put on back burner.

> I also didn't find much good documentation about this topic, so IDE support
> would be much appreciated.

Could you guys give me some example of connectors you are implementing? IMO the problem is that it is relatively rare need to implement new connector (I mean 'rare' relatively to number of users of JSF/Servlet/JPA specs). And so there is not much good documentation and no IDE support. From IDE point of view implementing JCA support is one thing but then you have to test it, document it, maintain it, improve it, etc. And if all this is needed for what for hundred users?? It's hard to justify. IMHO.
Comment 10 rdelaplante 2010-11-11 21:04:28 UTC
I use JCA to enable a web application to communicate over sockets with a legacy system using a proprietary protocol.  When we switched to Maven I ended up using its built-in support for JCA.   If you look at the first comment in this ticket, you'll see that all we're asking for is:

1) a project type that knows how to package a .rar file (include libraries inside)

2) include XSD in IDE so when we're editing the deployment descriptor it can provide code completion and documentation.   It doesn't need to be a visual deployment descriptor editor. 

3) Ability to deploy to app server from IDE. In GlassFish if you undeploy then deploy, you lose all your connection pool and JNDI references.  If you "redeploy" then it preserves that stuff.  IDE needs to support "redeploy". 

To be honest I don't know if I'd use the project type since I prefer Maven over Ant.
Comment 11 chaase3 2011-08-23 17:32:30 UTC
There's a chicken-egg aspect to this problem: it's hard to figure out how to develop a connector, so few people develop them. The Java EE Tutorial team is currently attempting to develop a connector example based on the mailconnector example currently supplied with the GlassFish Samples in the Java EE 6 SDK. The GlassFish Samples connector doesn't actually work out of the box if you try to follow the instructions, because the connector and instructions have not actually been updated for Java EE 6. 

The Tutorial team is having great difficulty creating a connector in NetBeans because we have to fake it -- the GlassFish Samples version is a freeform Java project, which can't be deployed; we tried making it a regular Java project from existing sources, but that can't be deployed either; now we have followed Adam Bien's suggestion to create it as an EJB project, which allows it to be deployed, but the project that actually uses it (containing a message-driven bean) fails to deploy because it thinks the RA is not deployed. We'll keep trying.

If we actually succeed in getting a connector application to work (we may have to do it using Ant only), there could be a number of Tutorial readers who will be developing their own connector projects. This may give you an incentive to make this possible using NetBeans.
Comment 12 David Konecny 2011-08-24 22:10:42 UTC
(In reply to comment #11)
> If we actually succeed in getting a connector application to work (we may have
> to do it using Ant only), there could be a number of Tutorial readers who will
> be developing their own connector projects. This may give you an incentive to
> make this possible using NetBeans.

chaase, I'm happy to help you find a workaround or a solution to run JCA tutorial from NetBeans. Perhaps it will have to be Ant Freeform project or maybe Maven JCA project? Based on results of this exercise we will see what changes would be preferable in NetBeans to support JCA out of of the box. What do you think?
Comment 13 chaase3 2011-08-26 18:47:36 UTC
Thanks, Dave, for that suggestion. I've been looking into it. It turns out that the glassfish/samples version of the connector does use a freeform Java project. If I create the connector as a freeform Java project myself, it appears that I can fix things in the Build and Run part of the wizard to make it work the same as the one in glassfish/samples -- add deploy and undeploy actions and so on. I compared the project.xml files and I think I can see how it is done.
Comment 14 David Konecny 2011-08-28 23:51:46 UTC
Once you have a working sample could you attach it here or send it to me please? Thanks.
Comment 15 chaase3 2011-08-29 21:07:24 UTC
Created attachment 110272 [details]
zip file with connector example

I'm attaching connector.zip, a working version of a connector from the GlassFish Samples. I'm including the bp-project directory, the common build instructions, the connector sample, and the mock-javamail jar file that it tells you to use.

Follow the instructions in javaee6/connectors/apps/mailconnector/docs/index.html to build and deploy the app.

The common build instructions tell you to edit bp-project/build.properties. I think you also need to edit app-server.properties, changing the settings that are specific to my system.

Depending on where you unzip the file in relation to your GlassFish installation, you'll need to modify the RA properties that specify module dependencies.

Please let me know if you need more info to run the app.

The app deploys and runs; it doesn't work as described (you can send a message, but the browse function doesn't work).

I am still tangled up in knots trying to make this work in our javaeetutorial environment, even though it uses bp-project just as the GlassFish samples do. But it does work in the samples.
Comment 16 Martin Balin 2016-07-07 08:54:33 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 17 chaase3 2016-07-07 13:23:06 UTC
The issue doesn't apply to Java EE 7, so it's definitely no longer relevant. Thanks.