留言板

WebSphere support in Liferay IDE 3 / Developer Studio 3

thumbnail
Geert van der Ploeg,修改在7 年前。

WebSphere support in Liferay IDE 3 / Developer Studio 3

New Member 帖子: 22 加入日期: 14-4-3 最近的帖子
Hi there,

For a client we're about to try and get Developer Studio 3.0 working with a local WebSphere application server (8.5.5.9, IBM JDK 8), to be able to deploy bundles straight to WebSphere (instead of the default Tomcat bundle).

Is there any experience with this, or a (formal or informal) statement from Liferay whether this should work?

(because, if Liferay says it will not work then we will not put any effort in it either...)

Thanks!

Geert
thumbnail
David H Nebinger,修改在7 年前。

RE: WebSphere support in Liferay IDE 3 / Developer Studio 3

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
Liferay 7 brings different challenges to websphere and weblogic.

Liferay has it's own deploy folder where all of your wars and jars should go. The reason is that these guys are not deployed to the app server any more, they are deployed into Liferay's own OSGi container.

On your local box, it really won't matter what app server you're using, you just put the deployment artifacts into the Liferay deploy folder and you're off to the races.

In the upper environments, though, deployment should be handled differently. There you typically have an admin console (especially in clusters) where you want to push one artifact to all nodes. But again, this is Liferay 7 so you can't put your wars/jars through the console this way cuz things just won't work.

But fret not, Liferay has a solution here in the form of the "deployment helper". The deployment helper is a special war file that has a listener defined in web.xml and your war/jar artifacts to deploy. When pushed out to your app server via the console, this war will get deployed like any other non-Liferay web app but, once it starts, it will extract all of the contained artifacts and put them all in the Liferay deploy folder and Liferay will pick them up and run with them.

For development, though, I'd recommend sticking with tomcat. When you think about it, your goal is to develop and test your code as quickly and simply as possible. Using a JEE app server for development is really overkill. Save the complexities with the JEE server for upper environments where the deployment issues should be handled.
thumbnail
Geert van der Ploeg,修改在7 年前。

RE: WebSphere support in Liferay IDE 3 / Developer Studio 3

New Member 帖子: 22 加入日期: 14-4-3 最近的帖子
Thanks for your quick and complete answer David.
I totally agree with you that WebSphere challenges better be saved for the 'upper environments' as you call them, and our advice is the same as yours. But, as things are at the moment, the client developers rather stick to their current setup of having Eclipse with IBM WebSphere plugins, so we're trying to find out what the options are.

What we are looking for in terms of IDE integration, is the typical stuff like live redeploys-upon-save, drag-drop of bundles to the server, etc.
That's something you don't get when just dropping bundles in the 'deploy' folder...

The deployment helper is a nice add-on (I already examined it) but it has it's own shortcomings:
1. although deployment feels like the 'normal tomcat' way, undeployment doesn't: removing the webapplication does not undeploy the bundle
2. Restarting the application server triggers a redeployment of the bundle (because the ServletContextListener triggers)
thumbnail
David H Nebinger,修改在7 年前。

RE: WebSphere support in Liferay IDE 3 / Developer Studio 3

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
Geert van der Ploeg:
What we are looking for in terms of IDE integration, is the typical stuff like live redeploys-upon-save, drag-drop of bundles to the server, etc. That's something you don't get when just dropping bundles in the 'deploy' folder...


Right, but those things are not an option with Liferay 7/DXP. You're no longer deploying wars into the app server, the "redeploy upon save" or "drag drop bundles to server" simply do not apply because they are not assets the application server is going to manage.

The deployment helper is a nice add-on (I already examined it) but it has it's own shortcomings:
1. although deployment feels like the 'normal tomcat' way, undeployment doesn't: removing the webapplication does not undeploy the bundle
2. Restarting the application server triggers a redeployment of the bundle (because the ServletContextListener triggers)


Even better, post deployment Liferay recommends an app server restart to ensure the OSGi container is "clean". But because the deployment helper redeploys when the app server starts, if you follow the recommendation you will be in an endless restart/deploy cycle. You almost have to deploy the deployment helper war, allow the app server to push the artifacts to the Liferay deploy folder, then undeploy the deployment helper war (so it doesn't do future redeploys), then restart your app server.

Fun fun fun. But when you're looking at a cluster of any size, being able to deploy to all nodes in the cluster from the management console can make this extra pain tolerable.
thumbnail
Geert van der Ploeg,修改在7 年前。

RE: WebSphere support in Liferay IDE 3 / Developer Studio 3

New Member 帖子: 22 加入日期: 14-4-3 最近的帖子
David H Nebinger:
Geert van der Ploeg:
What we are looking for in terms of IDE integration, is the typical stuff like live redeploys-upon-save, drag-drop of bundles to the server, etc. That's something you don't get when just dropping bundles in the 'deploy' folder...


Right, but those things are not an option with Liferay 7/DXP. You're no longer deploying wars into the app server, the "redeploy upon save" or "drag drop bundles to server" simply do not apply because they are not assets the application server is going to manage.


Sorry to disagree, but this actually is exactly one of the key features of Developer Studio, right? I just rechecked to make sure I'm not mistaken, but redeploy-upon-save and drag-drop-to-server Just Work (tm) with DXP + Developer Studio...

And the reason I am wondering whether this will work with WebSphere Application Server, is because - as I understood - the key functionalities of Liferay IDE are actually wrappers around Blade CLI. And as Blade CLI communicates directly with Felix the OSGi container (instead of the default way of Eclipse+Tomcat which means deploying plain webapps), I presumed it could work just as well with WebSphere as with using Tomcat.

Quote from the Blade docs @dev.liferay.com:
Blade CLI can detect a locally running Liferay instance and automatically deploys your module to that Liferay instance. Blade communicates with Liferay Portal’s OSGi framework using Felix Gogo shell and deploys the module directly to the OSGi container using Felix File Install commands. The command uses the default 11311 port by default.

https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/deploying-modules-with-blade-cli
thumbnail
David H Nebinger,修改在7 年前。

RE: WebSphere support in Liferay IDE 3 / Developer Studio 3

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
I keep forgetting the great work that Greg and his team does to make the IDE development stuff smooth... emoticon