java - Glassfish: Why are there 2 pools for the same MDB: one in ejb and one in war? -


scenario:

i have java maven ear project run on gf 3.1.2. in project want use mdb defined in individual ejb module put dependency. structure follows:

projectear:    - projectejb         - projectwithproblematicmdb    - projectwar         - dependency projectejb scope provided 

actual problem:

when deployed glassfish, of jconsole, see 2 different mdb pools problematicmdb: 1 in ejb module , 1 in war module. not same pool since have set deployment descriptor on projectejb limit pool size 1 , pool's size in projectejb doesn't larger 1 one in projectwar grows in size.

this happens mdbs=s modules referred in projectejb dependencies, not happen "native" mdbs projectejb. must mention fact cannot exclude projectwithproblematicmdb war since using beans there (not mdb) .

the question(s):

why there 2 pools same mdb? how can have 1 pool in scenario?

i found reason , solution.

reason:

looking .ear archive saw "native" ejb (projectejb) placed root of archive , "independent" ejb (projectwithproblematicmdb) packed in lib folder. reason because of this, glassfish creating pool in .war module too.

solution:

adding projectwithproblematicmdb projectear dependecy made maven pack in root of .ear archive , wasn't in lib folder anymore. after deployed application in form, second pool (the 1 .war) not created anymore.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -