Wednesday, 30 March 2016

JBoss DMR SYNTAX OF CLI and JVM

permGen or Non Heap Memory - staticmemory

Heap Memory - Object creation

Thread Stack - contains live threads available in Jboss.
obj reference available in Thread Stack which points to the objects in the HM.
static reference available in permGen but the actual object  'll be available in HM.

Min Heap Size : 512M
Max Heap Size : 2049M

When you declare like this for the jvm, when the server is gets started only512MB of RAM will be used, whenever higher size is required it make use of it from the RAM, but don't block the max memory.

HM declarations :
Stand Alone Mode  :
bin/standalone.conf.bat

Domain Mode:
Server Group level:
domain.xml

Server Level:
host.xml


DMR SYNTAX OF CLI

bin> jboss-cli.bat --connect controller=192.168.1.208:9999

it asks for jboss uname/pwd

jboss-cli.bat --connect controller=192.168.1.208:9999

C:\Users\edi5752\Documents\vamsi\EAP-6.4.0\bin>
C:\Users\edi5752\Documents\vamsi\EAP-6.4.0\bin>jboss-cli.bat --connect controlle
r=192.168.1.208:9999
Authenticating against security realm: ManagementRealm
Username: admin
Password:
[domain@192.168.1.208:9999 /]
[domain@192.168.1.208:9999 /]
[domain@192.168.1.208:9999 /] /
The operation name is missing or the format of the operation request is wrong.
[domain@192.168.1.208:9999 /]
alias               deployment-info     jms-topic           run-batch

batch               deployment-overlay  ls                  shutdown

cd                  echo                patch               try

clear               echo-dmr            pwd                 undeploy

command             help                quit                version

connect             history             read-attribute      xa-data-source

connection-factory  if                  read-operation      :

data-source         jdbc-driver-info    reload
deploy              jms-queue           rollout-plan
[domain@192.168.1.208:9999 /]



Class Loading in JVM:

Isolation Level in JBoss 


/module - static modules

Dynamic Modules:
Application what we deploy 'll be treated as dynamic modules.


If your application need to use external libraries, either of the following is must.

WebContent\Meta_INF\manifest
depandacies = net.jcip

OR

jboss-deployment-structure.xml - this should to kept in WEB-INF

<jboss-deployment-structure>

     <deployemnt>

<exclude-subsystem>  - this is to avoid any conflicts
          <subsystem name="org.hibernate"/>
          <subsystem name="resteasy"/>
</exclude-subsystem>

          <dependancies>
                 <module name="net.jcip">
         <module name="com.myjars.jfreechart">

    <dependancies>
<deployemnt>
<jboss-deployment-structure>


class loader preference order

implicit dependanies.
explicit dependancies.
local resources
inter deployment depandeancies.



In JBoss, each war is isolated, unless you explicitly configure.

Deploy ear project (create ear proj from eclipse, which takes web projects or wars to add to it)
No two wars can speak each other in jboss.
If one war is dependant on another it is not accesible, try accesing a war from another war\s serverlet. you will get NoClassDefFoundError.

If one project need to be visible to another , do the following steps.

earproj\earcontent\META-INF\jboss-deployment-structure.xml

<jboss-deployment-structure>

     <ear-subdeployments-isolated>true</ear-subdeployments-isolated>
     <sub-deployemnt name="JBossClassLoaderEx.war"> 

          <dependancies>
                 <module name="deployment.JBossEAR.ear.DynaPro01.war">
         <module name="com.myjars.jfreechart">

    <dependancies>
<sub-deployemnt>

<jboss-deployment-structure>


deployment.JBossEAR.ear.<DynaPro01.war> - Angular brackets represents JBossClassLoaderEx.war is depndant on DynaPro01.war.


First upgrade the technology, then upgrade the Application Server.

No comments:

Post a Comment