简体   繁体   English

JRebel Tomcat + Websphere

[英]JRebel Tomcat + Websphere

Can I tell my Intellij to rebuild .class for tomcat and in Webpshere jar files? 我可以告诉Intellij为tomcat和Webpshere jar文件重建.class吗?

My module configuration: 我的模块配置:

  <application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">

    <classpath>
        <dir name="C:/Workspace/Project/pro-commands/target/classes">
        </dir>
        <jar name="C:/Workspace/WAS8.5/profiles/project/installedApps/pckserkowskiNode01Cell/project-test.ear/pro-commands-1.0-SNAPSHOT.jar">
        </jar>
    </classpath>

</application>

<dir> work for Tomcat but <jar> for Websphere is never used. <dir>适用于Tomcat,但从未使用过<jar>用于Websphere。

If you want to reload classes in Tomcat and WebSphere at the same time, you need to deploy the application with rebel.xml that points to the location where your IDE compiles those classes to. 如果要同时在Tomcat和WebSphere中重新加载类,则需要使用rebel.xml部署应用程序,该应用程序指向IDE将这些类编译到的位置。

I think your mistake is that you think that the configuration file is used to point at the application which should be reloaded? 我认为您的错误是您认为配置文件用于指向应重新加载的应用程序? No! 没有!

Instead, The rebel.xml configuration file is used by JRebel agent to reconfigure the classloader to load the resources from the locations which are specified in the configuration file. 相反,JRebel代理使用rebel.xml配置文件重新配置类加载器,以从配置文件中指定的位置加载资源。

The first entry in your example is probably correct, since the classes are reloaded. 您的示例中的第一个条目可能是正确的,因为重新加载了类。 What's missing, probably, is rebel.xml in the application that is deployed in WebSphere. 可能缺少的是在WebSphere中部署的应用程序中的rebel.xml。 if you need to reload the classes that reside in the jar, please make sure that rebel.xml is packaged into the root of the jar file. 如果需要重新加载jar中的类,请确保将rebel.xml打包到jar文件的根目录中。 Then it should work just fine. 然后它应该工作正常。

If you are 100% sure that the configuration file is there, and you still do not see that the classes are reloaded, please contact JRebel support team at support@zeroturnaround.com -- they will assist on troubleshooting the issue. 如果您100%确保配置文件存在,并且仍然看不到重新加载了类,请通过support@zeroturnaround.com与JRebel支持团队联系-他们将协助解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM