[jboss-user] [JBoss Portal] - Is this app design for my portal app good or bad.

bmcgovern do-not-reply at jboss.com
Sun Feb 11 09:02:25 EST 2007


I have a portal w/ multiple portlets that talk to my database.  I'm using hibernate 3.2, jboss app server/portal server bundle.

Each page of the portal has between 3 and 7 portlets that each make a call to my single business object which gets 1 hibernate session from the factory PER METHOD and sends it in the constructor of each DAO that I use.  The business method starts, then either commits, or rolls back the tx.

If I refresh any portal page multiple times in a row, very quickly, I get "wrong tx on thread" errors.  Debugging the output, it seems that under that high concurrency, which i guess really isnt that high, the same TX is attempted to be committed by different sessions.  

Is my design sound?  Looking for help on how to debug.

Heres a little diagram.. Hope it makes sense.

Portal Page contains [ portletA, portletB, portletC ] each portlet calls a 
  | |
  | |--->Business Class [methodA(), methodB(), methodC()] 
  |        |
  |        |--->Various DAOs, each passed a session from prev layer.
  |                  [DAOa.findbyID(), DAOb.findbyID(), DAOc.findbyID()]

Incidently, I've had same problems using JTA OR JDBC transactions.  I've swapped out the default jboss connection pool with c3po and i do get better performance but it still breaks after refreshing like 5 x in a row. 

I'm at a point where i think it might be a flaw in the portal architecture, but I cannot say that without first verifying that i'm not causing the issue with bad design.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014495#4014495

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014495



More information about the jboss-user mailing list