[JBossCache] - Re: Problems with NodeLocking algorithm
by jason.greene@jboss.com
"jacek187" wrote : Hi
| The simplest solutions are always the best ;) Yes, REPETEABLE_READ +lockParentForChildInsertRemove really resolves this issues.
| But now, it's impossible to parallel put data into 2 separates nodes :(
| i.e. cache has /a/b/c node
|
| Thread-0: put into /a/b/c/X
| Thread-1: put into /a/b/c/Y
| Both threads are trying create children into c node, but Thread-1 must waits for Thread-0....
|
Right this is the primary issue with pessimistic locking (contention). The parent locking suggestion is just a workaround. We still want to look into the issues you describe, as even without locking the parent node, the changes should still be atomic. Manik was looking into one of the issues you opened, so I will ping him when he gets back.
Further analysis and patches are always welcome. Feel free to join the developer forums and mailing list if you like.
-Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082804#4082804
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082804
18 years, 7 months
[Clustering/JBoss] - multiple database servers for a multi-tenant environment
by lent
Hello,
We have a Software as a Service (SaaS), multi-tenant hosting platform where we assign tenants to different database servers. We have been handling this so far by getting database connections through code where we get the connection to the right database server for the current user based on which tenant he is with.
We are switching to a design where we no longer control the obtaining of the database connection since the connection is being obtained automatically based on configuration of datasource and persistence (persistence-unit). But we still need some way to support the selection of correct database server based on the tenant. We do NOT want to deploy an enterprise app multiple times (once for each tenant with a different datasource configuration). A couple of ideas we have are:
1) when looking up the datasource in jndi using jndi-name (e.g. jdbc/myDatasource), return a different datasource based on the user context. I don't know how feasible this is without maybe writing our own jndi service.
2) using AOP features, intercept the code obtaining the database connection and return the connection to the correct database server rather than the one that is configured. Again, I don't know how feasible this is.
If you have any suggestions on a different approach or any suggestions on one of the two approaches (or even the infeasibility of them), please let me know.
Regards,
Len Takeuchi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082801#4082801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082801
18 years, 7 months
[EJB/JBoss] - ejb deployer violation - Oracle
by jjoo
I am trying to use Oracle for Jboss Portal Server by the following steps.
1. copy and edit portal-oracle-ds.xml into server/defaultdeploy directory.
2. Delete portal-hsqldb-ds.xml
3. startup by run.bat
Before I connect to Oracle, the example application RosterApp was deployed correctly and working fine with Oracle.
After I have change the Portal database to Oracle, there is error messages popped up during startup.
Does anyone help me?
Jae
17:13:47,698 WARN [verifier] EJB spec violation:
Bean : RosterBean
Section: 22.2
Warning: The Bean Provider must specify the fully-qualified name of the Java cla
ss that implements the enterprise bean's business methods in the <ejb-class> ele
ment.
Info : Class not found on 'roster.RosterBean': Unexpected error during load of
: roster.RosterBean, msg=Bad version number in .class file
17:13:47,886 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-po
rtal-2.6.1.GA/server/default/tmp/deploy/tmp47192RosterApp.ear-contents/roster-ej
b.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
d, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:610)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082800#4082800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082800
18 years, 7 months