facebook

How to hot swap with MyEclipse, Ant, and WebLogic

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #224871 Reply

    xmarcus
    Member

    We have a large third-party WebLogic app that is build into many jar files and one ear file using ant scripts. I’ve setup Eclipse to make changes to this app and I would like to be able to make changes and have the changes “hot swapped” to the running WebLogic application. Is this possible using MyEclipse?

    Note that the project is set up as a regular Java project in Eclipse. When I want to rebuild, repackage, and redeploy, I use the existing third party ant scripts. I haven’t figured out if or how to hot swap to WebLogic with the regular Eclipse.

    Thanks

    #224877 Reply

    Riyad Kalla
    Member

    Hotswap is only supported when you use MyEclipse to deploy your application. If you are not using MyEclipse to deploy your application, there is no way for it to know where you want it to place changed files.

    #224881 Reply

    xmarcus
    Member

    Does this mean that you have to use MyEclipse to do all the building and packaging of jars, wars, and the ear file?

    Can you use an ant script to create an ear file and have MyEclipse deploy the ear file and thus be able to do the hot swapping?

    Thanks for your reply.

    #224885 Reply

    Riyad Kalla
    Member

    Marcus,
    Let me clarify how ‘hot swapping’ works… it isn’t necessarily black magic that occurs when two debuggers talk to eachother in code language, in can be as simple as your application server noticing that the timestamp on a file is newer than the last time it compiled it, and simply recompiling the file (or reloading the file) over again. This is how MyEclipse works. So if you want to ‘hot swap’ an EAR file, and need your Ant script to build it, just have the Ant script copy it out to the target location in the app server and be sure to setup your app server to ‘reload changed files’.

    NOTE: I am not aware of any app server that will automatically reload an EAR file, so ‘hot swapping’ with an EAR file is likely not going to work.

    NOTE: When I said “exploded deployment”, that means MyEclipse never packages the files but rather copies them out directly to the app server, so the app server can reload the individually changed files.

    So to make a long story short, if you want ‘hot swap’ you need to use an exploded deployment from MyEclipse or figure out how to replicate the behavior in your Ant script. MyEclipse won’t “deploy” a targetted EAR file for you, you have to set it up and it will deploy entire “projects” for you.

    I think you should check out our documentation here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html

    #224908 Reply

    xmarcus
    Member

    Thanks.. I understand now.

    There are a couple problems with using MyEclipse for deploying our app.

    The first is that the vendor ant scripts are huge and could take a while to understand their workings and then reproduce this behaviour in MyEclipse.

    The second is that the ant scripts could change with each release of the app. This would mean we would have to repeat this process of analyzing the scripts and reproducing their behavior for each release.

    Would you agree? Is there a workaround?

    #224912 Reply

    Riyad Kalla
    Member

    Ugg, that sounds like a headache, I agree, *not* using the Ant scripts sounds like it won’t work.

    I don’t know of a workaround (to not using ME) because I am not farmiliar with what the Ant scripts are doing nor do I know WL at all… can you check their forums or documentation about ‘reloading an EAR’ file or something like that? If you can do that, then just run your Ant script, go into WL administrative console and reload the app and see if it reloads the EAR file…

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: How to hot swap with MyEclipse, Ant, and WebLogic

You must be logged in to post in the forum log in