How to deploy EJB directly on specific cluster of glassfish from NetBeans - deployment

I have two clusters created on my local glassfish server. One is used for war deployment and the other is for ejb deployment.
When i try to deploy the ejb or war directly from netbeans, by default it deploys to the default cluster called "server".
I want to change it, so that it directly gets deployed to the corresponding cluster. How do i accomplish this? A guide would be appreciated.

You have to use this command:
asadmin deploy --target <clusterName> <yourApplication>
Have a look at this guide (valid for GlassFish 3.1): http://docs.oracle.com/cd/E18930_01/html/821-2432/gkybx.html

There isn't a guide for that. There is a short blog about registering a cluster as a deployment target in NetBeans.
Once your deployment target is registered, you would use it like a normal instance and chose it as a project's 'target server'.

Related

Weblogic 12c deployment shared library not picked while deploying to managed server

Application is a EAR file
Shared Library where the third party jar are bundled and deployed to managed server as shared library.
weblogic-application.xml file where library ref to shared library is made and present in EAR file(META-INF folder).
Shared libraries are deployed to managed server as target and is successful.
while deploying the EAR file, the selection of EAR from console deployment results in ClassNotFoundException of the class present in shared library even though the reference is made in weblogic-application.xml.
Note that if the Library deployment is targeted to Admin Server and Managed Server the deployment of EAR file is successful without any exception.
Single Admin Server deployment is working fine without any issues for the same setup.
Deployment is expecting the JAR is classpath of admin server while deploying to managed server. is this an intended behavior ?
Is there any setup configuration we are missing here ? Correct me if there is any steps gone wrong.
Update : we did the same deployment with ant script using wldeploy and no errors are encountered and application is deployed successfully.
This was a known issue in a previous version of weblogic. Maybe it is still not fixed.
CR282367
While using the WebLogic Administration Console with applications or EJBs deployed on a Managed Server that depend on a deployed library, you may encounter a java.lang.NoClassDefFoundError
Workaround:
The WebLogic Server Administration Console needs access to any shared library deployments so that Java data types and annotations can be processed. Therefore, all shared library deployments should always be targeted to the Administration Server in addition to any Managed Servers or clusters.
https://docs.oracle.com/cd/E11035_01/wls100/issues/known_resolved.html

Deliver WildFly with default deployment

WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final):
I am searching for a possibility to trigger the deployment of my Java EE application (packed as EAR file), without starting the WildFly server or using the deployment-scanner.
Is it possible to add the ear file to a configuration file, so that the server start the deployment of my application at the first time the server starts?
The server has to be started to deploy anything. You can use offline CLI to deploy the content. This wouldn't actually process the deployment until the server has been restarted.

Jelastic Eclipse Plugin - All Tomcat applications restart on Deploy

I have a Tomcat 7 server running on Jelastic. I'm using the Jelastic Eclipse Plugin to Deploy my projects, and all is good. However, I have more than one application deployed (in /webapps) on the Tomcat server and noticed that when I Deploy one project from Eclipse, the server restarts, thus restarting my unchanged application as well.
I had modified the server.xml to autoDeploy="false", but since it seems to be restarting the server, that wouldn't make any difference.
Is there some setting that would prevent this, or is it just the behavior of the plugin?
This is а regular deployment procedure and there is no way to prevent it if you use Eclipse Plugin for deploying.
But you can deploy your project without the node restarting. There are two ways:
Upload yourproject.war into the webapps folder using Jelastic's DashBoard file manager:
Disable the restarting after projects deploying.
Note: this option requires the administrative rights and you should contact your hoster to disable it.

How to configure deployment from Eclipse to Wildfly

When I deploy app using jboss-as-maven-plugin
mvn clean jboss-as:deploy
application works. When I try to deploy from Eclipse using e.g. "Full publish", it doesn't.
I've compared versions of application being deployed and seems that "Full publish" simply copied what has been specified in Properties > Deployment Assembly.
Is it possible to use this plugin during "Full publish" ?
I want to make use of hot deploy feature for jsp, but without properly configured automatic deployment from Eclipse I'm rather blocked.
regards
Lukas
Wildfly 8.0.0.CR1
Eclipse Keppler SR1
org.jboss.as.plugins:jboss-as-maven-plugin:7.2.Final
I just updated to wildfly, and I had to use this to deploy to jboss.
https://docs.jboss.org/wildfly/plugins/maven/latest/deploy-mojo.html
I am as troubled as you are with this.
After searching a bit more I have found these two suggestions in SO:
A: Eclipse Kepler and JBoss Wildfly hot deployment and
B: Hot deploy on JBoss - how do I make JBoss “see” the change?
In both cases I did a mvn install in order to create war file and then deployed it by right clicking the server and using add-remove. Now every time I changed something and then pressed save the console output would change informing me that 20:02:45,086 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "web.war" with deployment "web.war". If I pointed my browser to the URL of my project the changes would indeed be there.
NOTE: Be careful when undeploying in the second case. I had it undeployed from eclipse but when going at: http://localhost:9990/console/App.html#deployments I could still see the war so I also had to remove it by pressing the remove button from the Management Console.
I hope this helps but I am not sure that this kind of functionality is hot deployement though.

How to deploy a Glassfish application on CloudBees

I'm trying to deploy my Web application running on Glassfish on Cloudbees.
Unfortunately I didn't find any documentation or tutorial.
I'll be very thankful if anybody can explain me the best way to do this. I'm lost...
Thank you!
(PS: I'm working on Netbeans)
To deploy, you need to right-click on the project in the NetBeans project list and click "Deploy". Obviously you need to ensure that the properties for the project are pointing to the correct deployment location and directory.
To get a glassfish container at runtime you'll need to setup your application to run he related clickstack. You'll need the CloudBees SDK installed, and run this command :
bees app:deploy -a DOMAIN/APP_ID -t glassfish3 hello.war
Another option is to use cloudbees clickstart (see clickstart icon top left on cloudbees web toolbar) and select the glassfish one. Then commit your own code in the generated application skeleton, or change the generated jenkins job to point to your existing SCM
Please note this container is a community work in progress, doesn't provide all the features you can have on the tomcat6 or jboss7 runtimes. If your application isn't container dependent, those ones may be a better option then.
My application is working, actually I had to create an application using JavaEE6 in configuration (it's a jboss server in reality).
I configured the persistence.xml and added a cloudbees-web.xml.
I also deleted some hibernate and mysql jar(s) and it has worked!
I hope that can help others cloudbees developers!