[Design of JBoss Portal] - Re: portal clustering problem when using optimistic locking
by galder.zamarreno@jboss.com
Prabhat,
I'll have a look at this in the next couple of days but it's worth noting that with SYNC communication, specially replication, there's always a chance of a deadlock because locks are only acquired at commit time. So, individual nodes could successfully acquire nodes locally, and then cross each other when trying to acquire locks cluster wide. The end result is both nodes timing out in their operation:
Example:
Tx1 acquires WL on N1 for node /a/b
Tx2 acquires WL on N2 for node /a/b
Tx1 tries to commit and attempts to acquire lock for /a/b while Tx2 is trying to commit and attempt to lock that same node cluster wide.
Tx1 rollbacks because it can't acquire locks for /a/b in N2 and viceversa
As I said, I'll check the attached files in the next couple of days to confirm whether this is precisely what you're seeing. However, it's worth keeping it in mind.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158400#4158400
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158400
16 years, 3 months
[Design the new POJO MicroContainer] - Changing the way AbstractVFSDeployment serializes root
by alesj
In AbstractVFSDeployment we do
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
| {
| super.readExternal(in);
| root = (VirtualFile) in.readObject();
| }
|
| public void writeExternal(ObjectOutput out) throws IOException
| {
| super.writeExternal(out);
| out.writeObject(root);
| }
|
I would change it to
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
| {
| super.readExternal(in);
| URL url = (URL)in.readObject();
| root = VFS.getRoot(url);
| }
|
| public void writeExternal(ObjectOutput out) throws IOException
| {
| super.writeExternal(out);
| out.writeObject(root.toURL());
| }
|
that way you don't serialize all the things that were already touched.
Only re-constructing lazy things on client side when needed.
The only thing with 2nd approach is that you loose parent info, and you probably get different vfs context.
But do we really care about that?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158398#4158398
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158398
16 years, 3 months
[Design of JBossCache] - Re: JBoss Cache Public API
by bstansberry@jboss.com
Just for some background on my comment on "create" being a legacy of the old JMX microkernel. Here's the content of the slide on create() from the JBoss Advanced course:
anonymous wrote : Create is called when all bean I depend on are "created"
|
| When a service's create method is called
| - This gives an MBean an opportunity to check that required MBeans or resources exist.
| - The service typically cannot utilize other MBean services at this point, as most JBoss MBean services do not become fully functional until they have been started via their start method.
| - Because of this, service implementations often do not implement create in favor of just the start method because that is the first point at which the service can be fully functional.
The key bit is the "gives an MBean an opportunity to check that required MBeans or resources exist" comment. The create method was really an added step to get around the lack of dependency injection in early JBoss. An MBean couldn't have another MBean injected. Instead it would have an ObjectName or some other handle injected, and in create() would look up the dependency. Proper IOC removes the need for this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158383#4158383
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158383
16 years, 3 months