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.
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.
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?
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
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.
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)?
Note: if you start NetBeans with the following property defined, GF should be autoregistered.... com.sun.aas.installRoot
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"
sorry, defining a custom dir in my folder, works
Ok, seems to be resolved.