[JBoss Cache: Core Edition] - Re: on child insert parent, child collection updated in DB b
by dukehoops
Brian,
I didn't understand your comment above. Were you saying that you will take my test source and adapt it to hibernate-jbc test suite or were you suggesting I do it?
I took another look at hib-jbc project but could not find any examples of tests exercising hibernate and jbc *3*. I looked here:
http://anonsvn.jboss.org/repos/hibernate/core/trunk/cache-jbosscache2/
But this project uses jbc2, meaning (AFAIK):
-using jbc2-styled config
-using optimistic or pessimistic locking (and not MVCC).
In other words, it's not the same setup as one described above.
TransactionalAccess or OptimisticTransactionalAccess?
And that got me thinking of whether I am using correct TransactionalAccess class:
org.hibernate.cache.jbc2.access has two classes:
TransactionalAccessDelegate and OptimisticTransactionalDelegate. The latter does things like this:
Option opt = getDataVersionOption(version, version);
return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
Debugging tells me I am using TransactionalAccessDelegate. Shouldn't OptimisticTxDelegate be used since my Domain object do use Hibernate's @Version? Or is that irrelevant because the two choices translate to deprecated Optimistic or Pessimistic locking in JBC and we're using MVCC?
I also have caches configured as Srping Beans (with Configuration and RuntimeConfig also spring beans) and use org.jboss.cache.CacheFactory directly to build caches (as described in JBC3 User Guide). org.hibernate.cache.jbc2 on the other hand uses org.jboss.cache.CacheManager to do the same. The reason I went with that approach is that org.hibernate.cache.jbc2 seems to want to work of jbc2-styled treecache.xml config only and does not parse org.jboss.cache.config.Configuration
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215805#4215805
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215805
15 years, 10 months
[Installation, Configuration & DEPLOYMENT] - Migrating existing application to different business model
by jobbyjoseph
Hi Experts,
I am working with an application which is currently running under JBoss 4.2.2 GA, The whole application is deployed as two separate ear. Ear 1 uses EJB2.1, Struts1.1. Ear 2 users Hibernate3.2.4.sp1, JSF1.2. I use the Single Sign-On valve to make sure that the both application works together seamlessly even though they are two separate ears.
The reason there are two ear's is that we are gradually migrating the existing EJB2.1, Struts1.1 app to Hibernate3.2.4 and JSF1.2. Each client hosts this application at their local servers and we supply them with the pre-configured JBoss. Both the application shares a single datasource and this is the configuration
<local-tx-datasource>
| <jndi-name>DefaultDataSource</jndi-name>
| <connection-url>jdbc:jtds:sqlserver://localhost:1433/database</connection-url>
| <min-pool-size>25</min-pool-size>
| <max-pool-size>25</max-pool-size>
| :
| :
| :
|
| </local-tx-datasource>
Now that I have described the system somewhat well I would like to come to my problem. The management now wants to host the application within the company and sell this as a service. What will be the best solution for this without doing much of a code re-write. Since because of the tighter regulation each clients should have thier own database. i.e clients will not be allowed to share the database.
I was thinking of configuring the app so that each client can access their own app using sub-domians eg: https://client1.myapp.com/context. One of my problem with this is the sharing of the datasource. Since they have to use separate databases i would have to create datasources dynamically and some how make the same application use different datasource for different clients. I am not even sure whether i am thinking in the right direction.
Please give me some suggestions to achieve this. and what do you all think will be the best practice here.
Thanks in advance for all your time,
Jobby
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215792#4215792
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215792
15 years, 10 months