How to configure application level settings in Websphere developer tool in Eclipse? - eclipse

I install WebSphere Developer tools for Eclipse and refer to my local WebSphere 7 installation. Then deploy a Spring application within an EAR project. However, when I deploy the EAR project into WebSphere server instance in Eclipse, I find no options/UI to assign external library or assign role/user mapping etc, just like what I can do in WebSphere console.
When log on WebSphere console I do see the project setting but cannot save the change.
So is there anyway to configure on the UI or I have to make every change in an WebSphere XML configuration file?

In Eclipse, I find no options/UI to assign external library or assign role/user mapping etc
Yes, you have to do it via console.
When log on WebSphere console I do see the project setting but cannot save the change.
Thats the common problem. Open the Server configuration and uncheck Minimize application files copied to the server. Restart server, undeploy and redeploy application. You should be able to save mappings.
If this doesn't help (helps in most cases but not for some settings and I don't remember for which), then in the Publishing options, switch to Run server with resources on Server, this will work for sure, but deployment will be a bit longer. Of course restart and redeploy app.
You will see the missing OK buttons in the admin console then.

Related

IntelliJ Ultimate Equivalent of Eclipse Servers Project (Tomcat)?

I've recently switched from Eclipse to IntelliJ Ultimate and have a question regarding locally testing a Tomcat app from within the IDE.
I have a /META-INF/context.xml file that needs to be deployed with the WAR when it is deployed on our remote Tomcat servers, but because of the way it is setup, this file cannot be used when testing locally.
To handle this in Eclipse, there is a "Servers" project where you can set Tomcat configuration like context.xml, server.xml, catalina.properties, etc. that is ONLY used when running the app from within Eclipse.
I didn't see anything similar to this in IntelliJ. Basically what I need is the capability to use a custom context.xml when running locally in the IDE and a different context.xml when deploying to the real remote servers.
I have a feeling this should be handled in the Tomcat Run Configuration within IntelliJ, but didn't see anything obvious in there.
Thanks!

Packaged Server option not available in Eclipse with Bluemix and Liberty plugin

I'm trying to customize the Liberty setup, following the instructions from this post:
"Custom Liberty server.xml configurations in IBM Bluemix", see:
https://www.ibm.com/blogs/bluemix/2015/01/modify-liberty-server-xml-configurations-ibm-bluemix/
In order to modify the Liberty server features, I'd like to replace the automatic generation of the configuration file by a customized server configuration, which according to the instructions is called "Liberty packaging server".
In the Eclipse Neon IDE, I've already installed two plugin's, the Bluemix Tool as well as the Liberty Development Plugin. At the server tab, I'm right clicking the active Blumix server, but no option for "packaging server" is displayed at the menu. The default "push" option is working fine.
At the Eclipse IDE, is there a software component missing to create and publish a customized server package (beta + features) for Liberty? How can I run a customized packing without command line tools, using Eclipse?
There are two main ways to publish a packaged server in Bluemix:
You have (or create) a Liberty server instance that represents the server. For details on how to create a Liberty server, see http://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/t_creating_server.html. Once you have the Liberty server created in Eclipse, you can just add the Liberty server to the Bluemix server on the Servers view and it will package the server for you during the publish operation.
You already have an existing packaged server zip file in the workspace that you want to publish. Then, you can just right click on the zip file and do a Run As > Run on Server.
For details, you can refer to https://console.ng.bluemix.net/docs/manageapps/eclipsetools/eclipsetools.html#packagedserversupport
The first method is usually preferred since you can continue to update the applications and also the server configuration file and do incremental update on the application by the publish operation.
In Eclipse, if you want to publish whole server to the Bluemix follow these steps:
stop your local Liberty server
in Eclipse in Servers view, grab the local Liberty server and drag it to the Bluemix one. It will publish whole server with its config.
Check this page for more details - Deploying apps with IBM Eclipse Tools for Bluemix
Instead of right clicking on the Bluemix server, you need to right click on your Liberty server definition.

Is it possible to do Hotswapping of ATG classes

The deployment we follow is that we use runAssembler.bat to build an ear file and deploy it in a app server. We are using weblogic and jboss for testing purposes of the modules we built. However for every small change, we need to run runAssembler and build a new ear and deploy it in app server and restart the server.
I would like to find out if anyone figured out a way to do Hotswapping of class files which are generated by the code we write in ATG environment in either weblogic or jboss.
By attaching your IDE to your Application server on the Debug port it is generally possible to do hotswapping. Setting this up on Eclipse and JBoss is documented here, here and here. There is some information for setting it up in WebLogic here.
Attach your debugger, edit the java file, click 'save' and with hot code replacement in your IDE it should now update the running class file. In Eclipse it usually gives a popup if it was unable to do the sync. If you are using Eclipse, make sure the 'Build Automatically' flag under projects is ticked or you'll be waiting forever. I've not had any issues doing this via JBOSS (exploded ATG EAR) and variable success in doing this on WebSphere 7. It may also be prudent to make sure the same JAVAC you use to compile your build is the one loaded into your IDE compile path.
Another way to at least reduce the build/deploy time would be to deploy an unpacked/exploded EAR and simply copy your class files across (you could use the Eclipse FileSync plugin) and restart the server.
There are also some commercial options available, like JRebel
In our organization, we had good success in using DCEVM. It simply patches your JDK (in Windows: jvm.dll).
Download and patch your JDK
Launch your JBoss/Weblogic with the patched JDK
Set up Eclipse's Installed JRE's to point to patched JDK (restart and rebuild once)
Start the server, Launch debugger and connect
Ensure Eclipse's Debug view shows "Dynamic Code Evolution VM" (instead of something like "HotSpot VM")
Change your code, and voila!
You can do this with JRebel. After hotswapping you don't need to restart the server, only reload you deployment from Weblogic.

How to avoid that glassfish deploys all the previous project?

When I start the glassfish server I have noted that it loads all the previous projects that i have developed and previously deployed.
I think that somewhere there is a config file that tells the server to reload the projects, but if i would like to work just on one of them what i have to do?
i suppose that i have to change or delete some entry in a glassfish configuration file, but i don't know where it is and how to do that.
thanks
Massimo
You have different options.
You can go to the Glassfish admin GUI via http://localhost:4848 and look under "Applications". You can undeploy properly deployed applications there.
If this is not working you can manually delete the applications from the glassfish folder: Look at
/[glassfish_installation_path]/glassfish/domains/[your_domain]/applications
or
/[glassfish_installation_path]/glassfish/domains/[your_domain]/autodeploy
Glassfish is running applications in these folders at startup time.
The undeployment depends somehow on the method you used to deploy the applications...if you used NetBeans to deploy you can probably even select the application in NetBeans and click "Clean and build" do undeploy it.

One click build and deploy using Eclipse/Maven/JBoss AS 7

I was wondering if it is possible to make a Java EE application being managed by Maven and automatically deploy it to JBoss all from Eclipse. To my knowledge I current right click on my project and select "Make install". After that completes, I open the server pane and right click on my deployed ear and either select "Full Publish" or "Incremental Publish". Is there a way to condense these actions into one click? I tried to write a windows batch file but I didn't have much luck with that, and it would only work for our devs working on Windows machines. I know I can make run configurations but when I try to make one it is very intimidating and I get frustrated and give up.
Thanks for your help!
You can use JBoss Tools 3.3.0 (Current milestone M4) with the maven integration to easily deploy projects (wars or ears) to your AS7 server.
Once you defined your AS7 instance in eclipse, all you have to do is right click on your project > Run As ...> Run on Server. It'll start your app server if it's stopped, or just deploy your app if it's already running.
See http://vimeo.com/25768303
and http://community.jboss.org/en/tools/blog/2011/11/09/jboss-tools-shift-happens-in-m4
If you are using maven, you can use the cargo plugin: http://cargo.codehaus.org/Maven2+plugin
You just configure where the JBoss is installed, set the plugin to run in the phase you want (or make a new one) and you are all set.
You can also create different configurations for different profiles, so you have local, integration, test, production, etc... And just by running with the selected profile deploys the ear in the server, remote or local.
If you want more control, you can set the path of the container as a variable that you pass in the Eclipse run configuration, that way each developer can have their servers in different paths.