Bug 126864 - Unable to add web or database servers to the service pallet programatically
Unable to add web or database servers to the service pallet programatically
Status: NEW
Product: serverplugins
Classification: Unclassified
Component: Code
6.x
All All
: P1 (vote)
: TBD
Assigned To: Petr Hejl
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-06 20:14 UTC by mh66639
Modified: 2010-05-31 12:58 UTC (History)
0 users

See Also:
Issue Type: TASK
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mh66639 2008-02-06 20:14:01 UTC
We have a strategic project where we are providing a plugin for 'ease of use' to the startup community.

The plugin would be added to a NetBeans IDE instance and configure the IDE to provide access to Sun's SAMP coolstack
running on an internal grid/virtualised infrastructure.

To do this we would like to add web servers and database servers to the services tree programatically and not requiring
the user to interact with the various server wizards.
Comment 1 Petr Hejl 2008-02-06 20:24:54 UTC
Can you specify your use case more precisely? I suppose you don't want to interact with j2eeserver api.. Am I right?

The web and database servers you want to register under "servers node" (right?) in "services" tab is your own or a third
party plugin?
Comment 2 mh66639 2008-02-06 20:43:32 UTC
We would like to remove the need for the users to go through the "Add Server" wizards for the MySQL, Tomcat and
Glassfish servers.  I guess a generic API that would take all the necessary data (as the wizards collect) would be great
- but probably a more longer term solution?

So in essence the module itself would be able to programatically supply the data to add these servers.  Right now I
don't think there is any type of API to be able to do that?

I tried a number of scenarios but it seems to come down to the locked-down encapsulation.

Let me know if I can clarify further.

Thanks,
Matt
Comment 3 Petr Hejl 2008-02-06 21:12:40 UTC
I don't know about database plugins, so following thoughts reflects j2ee servers.

I don't think there could be a generic api for programmatic registration - the contract of the server is defined in the
server plugin, so the plugin itself would have to provide such api.

However I think there could be a way. Try to check the
org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties.createInstanceProperties(). Maybe you could
workaround it in this way - however this approach could be _really_ fragile (as plugins can change properties they
requires without a notice).

The other trouble (in future) could be that there is new spi approaching to allow others (not just j2ee servers) to
register themselves under servers node. This could complicate things further. Actually we'd like to split all-in-one
approach used in j2eeserver (ui + persistence of instance + deployment...).

These are just my first thoughts, so maybe I'm not 100% correct in every aspect. You can check InstanceProperties and
look at the server plugin to figure out which properties it needs. It could work, but is risky in terms of future
compatibility.

P.

Comment 4 Petr Hejl 2008-02-06 21:24:05 UTC
Yet another note - it would be even more complicated with glassfish v3 as this will use the new spi and will be
logically divided into 3 modules (gf ruby, gf j2ee and gf common).

On the other hand - common serever modules (gf, jboss, tomcat) usually provide a way to initialize predefined instance
from the file - would it this help (as this is not programatic way, usually used to predefine server during the ide
installation)?
Comment 5 Vince Kraemer 2008-02-09 02:52:53 UTC
Note: if you start NetBeans with the following property defined, GF should be autoregistered....
com.sun.aas.installRoot

Comment 6 roti 2010-05-31 12:56:20 UTC
9.8RC1
When I have a glassfish v3 installed by root, can't add it from the ide as user:
selecting the install dir says:
"/usr/local/sges-v3 does not have a usable default domain"
Comment 7 roti 2010-05-31 12:58:16 UTC
sorry, defining a custom dir in my folder, works


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo