-
1. Re: Is there a way to solve this without cluster?
rhusar Oct 20, 2011 7:38 AM (in response to mglowacki)Czesc Michal,
great analysis and very good catch. This reminds me of my issue back in 2010 where I analyzed the synchronization in ENC factory is suboptimal. Could you have a look at the issue https://issues.jboss.org/browse/JBPAPP-4787 whether it is what you are seeing too?
Cheers,
Rado
-
2. Re: Is there a way to solve this without cluster?
rhusar Oct 20, 2011 7:43 AM (in response to mglowacki)Nearly forgot, the other 2 issues are:
https://issues.jboss.org/browse/JBPAPP-4786 - JBossWebMetaData.getRunAsIdentity
https://issues.jboss.org/browse/JBPAPP-4772 - EJB3 pool synchronization inefficiency; only open to partners
-
3. Re: Is there a way to solve this without cluster?
rhusar Oct 20, 2011 7:48 AM (in response to mglowacki)1 of 1 people found this helpfulAs you see, these problems are not really fixable and havent been completely fixed.
Lets get to solution then. Really, solving this with "cluster" as in fully replicated states and etc does not make much sense. Clusters provide high availability but since you would be running all instances in the same machine, the failure of one component or network or whatnot of that particular machine makes your entire "cluster" unavailable. Therefore, I propose a solution to use multiple standalone servers (well, depends on your app if thats doable). You can either do this via different port binding or create new virtual network interfaces and bind servers to them.
-
4. Re: Is there a way to solve this without cluster?
mglowacki Oct 20, 2011 8:27 AM (in response to rhusar)Yes, this is exactly what I would like to try - create two standalone jbosses and loadbalance them using Apache, so the visitors traffic is divided between two of them.
Regarding your issues, I think it's same as mine:
Thread: ajp-0.0.0.0-8009-813 : priority:5, demon:true, threadId:1431, threadState:RUNNABLE
org.jboss.naming.ENCFactory.getObjectInstance(ENCFactory.java:114)
- locked <0x7406ce55> (a java.util.WeakHashMap)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
javax.naming.spi.NamingManager.getContext(Unknown Source)
javax.naming.spi.ContinuationContext.getTargetContext(Unknown Source)
javax.naming.spi.NamingManager.getContinuationContext(Unknown Source)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:832)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
javax.naming.InitialContext.lookup(Unknown Source)
org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:82)and other threads waiting for weakhashmap. BTW, I am using JBoss 5.1 standalone, not EAP.
-
5. Re: Is there a way to solve this without cluster?
rhusar Oct 20, 2011 8:34 AM (in response to mglowacki)So is there something I could help you with setting this up?
-
6. Re: Is there a way to solve this without cluster?
mglowacki Oct 20, 2011 8:37 AM (in response to rhusar)hehe, just promise this would help
-
7. Re: Is there a way to solve this without cluster?
rhusar Oct 20, 2011 8:43 AM (in response to mglowacki)LOL!!!
I promise this will fix the issue of thread congestion resulting in blocking around EJB/Metadata. However there will be some performance tradeoff for running multiple instances plus this might introduce new issues. I think its worth a try and its not that much work to set that up.
-
8. Re: Is there a way to solve this without cluster?
wdfink Oct 20, 2011 3:20 PM (in response to mglowacki)I suppose this solution will help (for a while) I have had a similar configuration using EJB.
For this we setup multiple instances on one power system. It will solve the 'sync' stuff but if the JBoss app scales you might bring the DB in behind under heavy load .
Will say as more performance you have as more you will need