running test suite with JBossTM vs DummyTM
by Mircea Markus
Hi,
Right now we are running our test suite using DummyTM.
This is mainly for suppling users with a default, lightweight TM. And avoid a additional dependency.
Even though this worked well for us so far, this might not be such a good idea after all: there are many not-so-obvious rules to be considered when implementing such a transaction manager which, if not implemented might make our XAResource implementation work badly even though it works fine(eg [1]). Or even worse, it might make it look okay even though it doesn't.
On top of that there are grey areas in JTA spec, for which different vendors use different approaches. By using/testing against JBossTM we can document these usages and stick with (the recommended?) JBossTM functionality.
Taking this one step further, wondering weather it makes sense to keep the DummyTM as it is in our code base, given the fact that it is far away from implementing the spec. One solution would be to enhance it (-1 IMO), another to replace it. Perhaps with a lightweight JBossTM?
Cheers,
Mircea
[1] http://lists.jboss.org/pipermail/infinispan-dev/2011-January/007243.html
13 years, 11 months
Logging in Infinispan
by Manik Surtani
Guys,
Our current Log impl allows for string formatting, using params like
log.info("This is a {0} with some {1}", "string", "words")
originally inspired by the Seam logger. IMO we should switch to using a more standard form of parameterisation, as used by the JDKs String.format() - as well as in many other languages including C and Python:
log.info("This is a %s with some %s", "string", "words")
This will be more consistent with String.format() used elsewhere (e.g., generating exception messages). A quick search and replace in the codebase will take care of this. Opinions?
Cheers
Manik
--
Manik Surtani
manik(a)jboss.org
twitter.com/maniksurtani
Lead, Infinispan
http://www.infinispan.org
13 years, 11 months
Readonly tx leak fix causing issues with Hibernate 2LC use case
by Galder Zamarreño
Hi,
Re: https://issues.jboss.org/browse/ISPN-845
This is causing issues with use cases such as the Hibernate 2LC. Imagine this scenario:
tx.begin();
cache1.get();
cache2.put();
cache3.remove();
tx.commit();
At commit time, 3 prepares are generated of which, the 1st prepare is marked as readonly (no mods made on cache1), so that prepare is committed in advance.
Now, when tx.commit() is called it fails cos the first tx for cache1 has already been committed.
There's a test that simulates this kind of scenario in Infinispan 2LC testsuite.
A different solution is needed and seems like this was discussed this week in Newcastle? (https://issues.jboss.org/browse/ISPN-887)
Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
13 years, 11 months
ISPN 200
by Israel Lacerra
Manik,
What you mean by:
" * The calling node returns a CacheQuery impl that lazily fetches
and collates results from the cluster." (JIRA)
Is enough if each node returns a list of keys and then, we lazily get the
values using the keys? Or the process has to be more lazy yet?
thanks!
Israel Lacerra
13 years, 11 months
Fwd: EC2 Demo feedback
by Pete Muir
Note, I am intentionally being very dumb when testing out these demos, and giving up at the first sign of trouble to try to simulate a beginner ;-)
1) I wonder if the instructions would be better off on the wiki, as you need to do steps before opening up the readme really (start the instances, download the zip etc.)
2) Instructions are pretty limited on some stuff, like what EC2 AMI to use, how to get your software on there etc. At least some basics like AMI to use, links to EC2 docs would be nice. (NB I spoke to Marek Goldman and he is publishing an AS6 AMI soon, that would allow us to very easily make these instructions more concrete).
3) Include details about what ports to open etc.
4) Tutorial mentions specific jar versions, best to remove these to make it easier to maintain
5) Tutorial mentions a bunch of jars but not where they are in the zip
6) Tutorial mentions infinispan-all.jar which I can't find, I guess it means infinispan-core.jar
7) Tutorial talks about infinispan-ec2-demo-web.war which I can't find, guess it means modules/ec2-ui/infinispan-ec2-demoui.war
8) This tutorial would be much better as a series of steps than as a set of paragraphs, I was missing stuff out (the info is too dense)
9) I get this error when deploying the app
11:01:54,507 INFO [TomcatDeployment] deploy, ctxPath=/infinispan-ec2-demoui
11:01:54,593 INFO [STDOUT] in CacheServletListener
11:01:54,593 INFO [STDOUT] CacheBuilder called with ${CFGPath}/infinispan-ec2-config.xml
11:01:54,595 ERROR [STDERR] java.io.FileNotFoundException: File ${CFGPath}/infinispan-ec2-config.xml could not be found, either on the classpath or on the file system!
11:01:54,596 ERROR [STDERR] at org.infinispan.config.InfinispanConfiguration.findInputStream(InfinispanConfiguration.java:395)
11:01:54,596 ERROR [STDERR] at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration(InfinispanConfiguration.java:134)
11:01:54,596 ERROR [STDERR] at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:243)
11:01:54,596 ERROR [STDERR] at org.infinispan.ec2demo.CacheBuilder.<init>(CacheBuilder.java:23)
11:01:54,597 ERROR [STDERR] at org.infinispan.ec2demo.web.CacheServletListener.contextInitialized(CacheServletListener.java:35)
11:01:54,597 ERROR [STDERR] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3369)
13 years, 11 months
EC2 Demo feedback
by Pete Muir
Hi Noel
Generally, I was thinking about a new wiki page to complement the reference page i.e. a "Infinispan EC2 Example" page we could link from the reference.
On 20 Jan 2011, at 21:05, Noel O'Connor wrote:
> Hi Pete, Thanks for the feedback, comments inline.
> I'll update the wiki over the next few days.
>
> regards
> Noel
>
> On 01/20/2011 03:03 AM, Pete Muir wrote:
>> Note, I am intentionally being very dumb when testing out these demos, and giving up at the first sign of trouble to try to simulate a beginner ;-)
>>
>> 1) I wonder if the instructions would be better off on the wiki, as you need to do steps before opening up the readme really (start the instances, download the zip etc.)
> Probably not on the same page as its more of a reference but I can add them to a new page and link them.
>> 2) Instructions are pretty limited on some stuff, like what EC2 AMI to use, how to get your software on there etc. At least some basics like AMI to use, links to EC2 docs would be nice. (NB I spoke to Marek Goldman and he is publishing an AS6 AMI soon, that would allow us to very easily make these instructions more concrete).
> I was more focused on setting up Infinispan/JGroups than ec2 but once there is an AS6 ami I can add those details, same below with ports.
Great, Marek did you publish the AMI we talked about last week?
>> 3) Include details about what ports to open etc.
>> 4) Tutorial mentions specific jar versions, best to remove these to make it easier to maintain
> The reason for this was due to possible conflicts with existing jars e.g. JGroups etc
Hmm, not sure of the best way around this, I think right now it's potentially a source of confusion to people.
>> 5) Tutorial mentions a bunch of jars but not where they are in the zip
>> 6) Tutorial mentions infinispan-all.jar which I can't find, I guess it means infinispan-core.jar
>> 7) Tutorial talks about infinispan-ec2-demo-web.war which I can't find, guess it means modules/ec2-ui/infinispan-ec2-demoui.war
> Things have moved around and been renamed, I'll update the wiki
>> 8) This tutorial would be much better as a series of steps than as a set of paragraphs, I was missing stuff out (the info is too dense)
>> 9) I get this error when deploying the app
> You need to add the line "-DCFGPath=${ISPN_HOME}/etc/config-samples/ec2-demo/" to the jvm start-up settings. I'll update the wiki to reflect this
Ok, let me try getting further :-)
>> 11:01:54,507 INFO [TomcatDeployment] deploy, ctxPath=/infinispan-ec2-demoui
>> 11:01:54,593 INFO [STDOUT] in CacheServletListener
>> 11:01:54,593 INFO [STDOUT] CacheBuilder called with ${CFGPath}/infinispan-ec2-config.xml
>> 11:01:54,595 ERROR [STDERR] java.io.FileNotFoundException: File ${CFGPath}/infinispan-ec2-config.xml could not be found, either on the classpath or on the file system!
>> 11:01:54,596 ERROR [STDERR] at org.infinispan.config.InfinispanConfiguration.findInputStream(InfinispanConfiguration.java:395)
>> 11:01:54,596 ERROR [STDERR] at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration(InfinispanConfiguration.java:134)
>> 11:01:54,596 ERROR [STDERR] at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:243)
>> 11:01:54,596 ERROR [STDERR] at org.infinispan.ec2demo.CacheBuilder.<init>(CacheBuilder.java:23)
>> 11:01:54,597 ERROR [STDERR] at org.infinispan.ec2demo.web.CacheServletListener.contextInitialized(CacheServletListener.java:35)
>> 11:01:54,597 ERROR [STDERR] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3369)
>>
>> I'm stopping at this point, as I need to do the CDI webinar
>
> --
> Noel O'Connor
> Senior Middleware Consultant
> Red Hat Asia-Pacific,
> Level 35, 100 Miller St,
> North Sydney, Australia
>
> Mob:+61-408-000-666
> Fax:+61-2-8923-2899
>
13 years, 11 months