I have an EAR project that I am deploying to Jboss EAP 6.1. The product of my maven build is as follows:
myapp-ear
├── myapp-ejb.jar
├── myapp-web.war
├── lib
│ ├── activation.jar
│ ├── activiti-bpmn-converter.jar
│ ├── activiti-bpmn-model.jar
.....
│ ├── xml-apis.jar
│ └── xmlbeans.jar
└── META-INF
├── application.xml
├── hotswap-agent.properties
├── myapp-ds.xml
├── jboss-deployment-structure.xml
└── MANIFEST.MF
Here is what I get in jboss log when when deploying the application:
21:34:55,570 INFO [stdout] (MSC service thread 1-5) HOTSWAP AGENT: 21:34:55.569 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.jbossmodules.JBossModulesPlugin' initialized in ClassLoader 'ModuleClassLoader for Module "deployment.myapp-ds.xml:main" from Service Module Loader'.
21:35:04,357 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "null" (runtime-name: "myapp-web.war")
21:35:04,357 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "null" (runtime-name: "myapp-ejb.jar")
21:35:04,781 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for myproject
21:35:05,306 INFO [stdout] (MSC service thread 1-7) HOTSWAP AGENT: 21:35:05.306 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.jbossmodules.JBossModulesPlugin' initialized in ClassLoader 'ModuleClassLoader for Module "deployment.myapp-ear.ear:main" from Service Module Loader'.
and
21:35:05,488 INFO [stdout] (MSC service thread 1-6) HOTSWAP AGENT: 21:35:05.487 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.hotswapper.HotswapperPlugin' initialized in ClassLoader 'ModuleClassLoader for Module "deployment.myapp-ear.ear.myapp-web.war:main" from Service Module Loader'.
21:35:05,520 INFO [stdout] (MSC service thread 1-4) HOTSWAP AGENT: 21:35:05.517 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.jbossmodules.JBossModulesPlugin' initialized in ClassLoader 'ModuleClassLoader for Module "deployment.myapp-ear.ear.myapp-ejb.jar:main" from Service Module Loader'.
The problem is that when deploying my ear to jboss, it takes 10 times the usual time, and when I try to access the application from the browser, it throws out "PermGen space: java.lang.OutOfMemoryError: PermGen space". I'm tired of increasing my PermGen memory to 700 MB, but no luck. Therefore, I suspected that the hotswap agent was scanning all classes in my EAR, including those in the lib directory, which caused it to consume too much memory.
, , - , autoHotswap = false hotswap-agent.properties. EAR, , EJB WAR, . , , JVM_OPTS :
-javaagent:/workspace/tools/hotswap-agent-1.0.jar=disablePlugin=Deltaspike,disablePlugin=JavaBeans,autoHotswap=false"
, : hotswap ? , , "com.foobar"? , hotswap-agent jboss.