[Clustering/JBoss] - Re: sticky_session=0 + UseJk=false + HTTP Session Replicatio
by Hellaenergy
I'd like to clarify that I have a hardware LB in front of two separate Apache + mod_jk (configured to load balance) nodes. Each Apache + mod_jk node lb's to the same two JBoss AS servers. If the HW LB cluster in front of the Apache nodes decides to send a request to a node other than the originating Apache + mod_jk sticky session initiating node (we'll call this ws node 1) during an active session then my assumption is the other Apache + mod_jk node (ws node 2) will have no knowledge or ability to handle the other Apache + mod_jk lb nodes activities/ sticky session? Thus my reason for skipping the sticky sessions. Follow me?
The one thing they do have going for them is that they are both configured identically mod_jk wise. The workers are defined the same so therefore the jvmRoute entries theoretically could be identified by ws node 2 if ws node 1 wasn't available.
I guess this brings me to another question. Does mod_jk keep track of sticky sessions it's initiated locally? How is that information stored/shared? If there are two separate web servers with mod_jk identically configured to LB w/ sticky_session=true and sharing the same workers, could one entire web server fail and the other take over seamlessly? How would JBossAS handle this. How would mod_jk handle this?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242491#4242491
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242491
17 years
[EJB 3.0] - Re: onetomany relationship question
by Wolfgang Knauf
Hi,
I played around with your sample a bit. I agree that it works if you first create and save the parent, then create the child, set the parent and persist the child.
But assume that you don't save the parent, but the child. Here is the code snippet:
ParentBean parent = new ParentBean();
| entityManager.persist(parent);
|
|
| ChildBean child1 = new ChildBean();
| parent.getChilds().add(child1);
| //child1.setParent(parentNew);
|
| entityManager.persist(parent)
|
In this case, child and parent will be saved without error messages, but the relationship related database data is missing.
So, as a general guideline: always update both sides of the relationship, this will avoid a lot of problems ;-).
Best regards
Wolfgang
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242479#4242479
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242479
17 years