Any tricks to speed up RAD 7.5/WebSphere 7 deployment

风流意气都作罢 提交于 2019-12-10 14:08:16

问题


Recently I started working with RAD and WebSphere on development of web services and found out that it takes a while to republish ear file once changes are made to the code.

Any tricks and suggestions to speed them up?


回答1:


Try this and see if there is something in this article

https://www.ibm.com/developerworks/wikis/download/attachments/113606723/radtipsv754.pdf

that make your RAD work faster for you than it is currently.

HTH Manglu




回答2:


There is a known problem about this, see: http://www.ibm.com/support/docview.wss?rs=180&uid=swg21396021

Setting the metadata-complete value to true in your web.xml will prevent scanning for annotations and speed up things.

You can also use the Annotation scanning filter in the manifest file of the module to selectively prevent annotation scanning of jar files.




回答3:


this is not specific with RAD, but after working years with WebSphere I found that if you're not modifying the deployment descriptor or the web service descriptor, you can simply update the exploded EAR/WAR file in the installedApps folder of your WAS application server. To update, you can simply "unzip" your new JAR file onto the folder.

Afterwards restart the application server. SIGNIFICANTLY faster, especially if your WAS startup is quick.




回答4:


Unfortunately i havent had the opportunity to try it out since we just moved from RAD to Eclipse but i recomend you to invest a few minutes in checking out if JRebel works with RAD.

If it does work it would reduce the amount of builds/ deploys to nearly 1 per day (or computer restart) as faar as i am experiencing it with Eclipse+WAS8.5 after moving from RAD+WAS7.5.

@Edit: For sure RAD does not need to support JRebel as it is designed to run IDE independent just as maven, ant and tonns of other helpful tools. More Important is the point it runs with Websphere and i assume the WAS deployment process takes the most of the time you want to spare.




回答5:


There are some simple steps you can significantly improve deployment speed of your application on WebSphere:

  1. Define Ignore-Scanning-Archives with all third-party jars, that you don't want for Webshere scanning for annotations. You can do this in manifest file or simply in pom.xml. Be careful with it, there are no regex and if you write multiple jars in one line in manifest it will not work due to manifest.mf limitations of line length. If you write it in manifest.mf you need to go to new line with space at the start of line (see example below).

    But you can write it in one line in configuration of maven war plugin (see full example below) and Maven will automatically split it into multiple lines.

  2. Second approach is to define in Manifest/Maven/Websphere Enable-Implicit-Bean-Archive to false It will disable CDI in packages, which not contains beans.xml

  3. Third approach is to increase java heap size in Websphere JVM properties. You need to go: Websphere IBM Console -> Servers -> {your server} -> Server Infrastructure -> Java and Process Management -> Process definition -> Additional Properties -> Java Virtual Machine -> Set Initial heap size(MB) - 300 (or more) Maximum heap size(MB) - 600 (or more)

Code example for maven-war-plugin in pom.xml:

 <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
            <failOnMissingWebXml>false</failOnMissingWebXml>
            <packagingExcludes>pom.xml</packagingExcludes>
            <archive>
                <manifestEntries>
                    <Enable-Implicit-Bean-Archive>false</Enable-Implicit-Bean-Archive>
                    <Ignore-Scanning-Archives>
                        hibernate-core-5.2.10.Final.jar,httpclient-4.4.1.jar,poi-ooxml-3.17.jar,poi-3.17.jar,poi-ooxml-schemas-3.17.jar,antlr-2.7.7.jar, apns-1.0.0.Beta6.jar,ews-java-api-2.0.jar,itextpdf-5.5.11.jar,byte-buddy-1.6.6.jar,xmlbeans-2.6.0.jar,guava-23.5-jre.jar,commons-collections4-4.1.jar
                    </Ignore-Scanning-Archives>
                </manifestEntries>
            </archive>
        </configuration>
    </plugin>

Example of manifest.mf

Manifest-Version: 1.0
Built-By: your-name
Enable-Implicit-Bean-Archive: false
Created-By: IntelliJ IDEA
Build-Jdk: 1.8.0_144
Ignore-Scanning-Archives: hibernate-core-5.2.10.Final.jar,httpclient-4
 .4.1.jar,poi-ooxml-3.17.jar,poi-3.17.jar,poi-ooxml-schemas-3.17.jar,a
 ntlr-2.7.7.jar, apns-1.0.0.Beta6.jar,ews-java-api-2.0.jar,itextpdf-5.
 5.11.jar,byte-buddy-1.6.6.jar,xmlbeans-2.6.0.jar,guava-23.5-jre.jar,c
 ommons-collections4-4.1.jar



回答6:


One of the annoying things that slows RAD is the automatic publishing that the server does.So if you can change the option in sever configuration editor (which you can access by double clicking the servers in server view) that could prevent publishing at times you don't want. Make sure you publish it when ever you need to make a change.

Also I think if you change the option to "publish without copying the resources" that could also speed up you sever startup.



来源:https://stackoverflow.com/questions/5120526/any-tricks-to-speed-up-rad-7-5-websphere-7-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!