Re: [infinispan-dev] JBM version in ISPN 6.0

2013-09-20 Thread David M. Lloyd
On 09/20/2013 06:40 AM, Mircea Markus wrote: > Hi guys, > > ISPN 6.0 final is scheduled for 11 Oct. > Is there going to be an JBM 2.0 final release prior that date? > Paul, what JBM version does 6.0 integration into AS? JBoss Marshalling 2.0 will have incompatible API changes that are not going t

Re: [infinispan-dev] Clean ThreadLocals

2013-12-11 Thread David M. Lloyd
On 12/11/2013 04:47 PM, Pedro Ruivo wrote: > Hi, > > I've created a method to clean a specific ThreadLocal variable from all > live threads [1]. > > My goal is to clean the ThreadLocal variables after a cache stops. It's > kind expensive method (it uses reflection) but I think it is fine. > > Curre

Re: [infinispan-dev] JBoss Marshalling 1.4.4.Final + ASL + Infinispan 6

2014-03-05 Thread David M. Lloyd
On 03/05/2014 02:12 PM, Tristan Tarrant wrote: > Dear all, > > David Lloyd has kindly release JBoss Marshalling 1.4.4.Final under the > ASL: this means that all of our core deps are now ASL. Should we release > a 6.0.2 with this dependency change only ? FWIW there's also a nice bugfix in there: th

Re: [infinispan-dev] if (trace) logger.tracef - it makes sense

2016-09-30 Thread David M. Lloyd
On 09/30/2016 01:53 AM, Sebastian Laskawiec wrote: > Hey! > > A while ago I asked Radim and Dan about these kind of constructs [1]: > > private boolean trace = logger.isTraceEnabled(); //stored in a field > > ... called in some method ... > if(trace) > logger.tracef(...); > ... > > At f

Re: [infinispan-dev] if (trace) logger.tracef - it makes sense

2016-09-30 Thread David M. Lloyd
ust on the fly >>>> and switch it of to prevent from throtteling the server by that log >>>> statements or restart the server. >>>> We have the same issue in EAP but here a restart is not that bad as here >>>> you >>>> don't have to

Re: [infinispan-dev] To Optional or not to Optional?

2017-05-25 Thread David M. Lloyd
I'm not an Infinispan developer, but I'll chime in anyway. :) I've never been a fan of Optional. But the theory behind it that made it acceptable in the first place is that it generally gets optimized away. Now this theory is only true if you never hold a reference to it in any persistent mann

[infinispan-dev] Marshaller implementation discovery

2010-12-27 Thread David M. Lloyd
Sanne Grinovero asked me to drop a quick note about the API used to discover JBoss Marshalling implementations. Since 1.2.0.GA, you can use the org.jboss.marshalling.Marshalling class methods to locate protocol implementations without involving a hard dependency in your sources. I've heard tha

Re: [infinispan-dev] Logging in Infinispan

2011-01-25 Thread David M. Lloyd
Use the %1$s form. On 01/25/2011 04:08 PM, Emmanuel Bernard wrote: > In some languages, param 2 needs to be put before param 1. How do you solve > that wo positional params? > > On 25 janv. 2011, at 15:52, Pete Muir wrote: > >> >> On 25 Jan 2011, at 20:29, Manik Surtani wrote: >> >>> Guys, >>> >>

Re: [infinispan-dev] use %s syntax for formatting exception messages

2011-03-15 Thread David M. Lloyd
If you use the JBoss standard i18n library, you can put things like this on your message bundle interface: @Message("You're not allowed to use %s and %s together") ConfigurationException cantUseTogether(String that, String other); then you can just do: throw cantUseTogether(that, ot

Re: [infinispan-dev] @Marshallable as an option for end user externalizers?

2011-03-17 Thread David M. Lloyd
On 03/17/2011 05:43 AM, Manik Surtani wrote: > > On 17 Mar 2011, at 08:30, Galder Zamarreño wrote: > >>> >>> Is it to do with classloader leaks? If so, a weak map could be >>> used for this table... >> >> You misunderstood what I meant. By annotation scanning I meant that >> we won't be scanning t

Re: [infinispan-dev] @Marshallable as an option for end user externalizers?

2011-03-17 Thread David M. Lloyd
:06 PM, Galder Zamarreño wrote: >> >> On Mar 17, 2011, at 3:22 PM, Manik Surtani wrote: >> >>> >>> On 17 Mar 2011, at 14:16, David M. Lloyd wrote: >>> >>>>> >>>>> Ah I see what you mean. Initially I thought you'd only need

Re: [infinispan-dev] XAResource without recovery

2011-04-20 Thread David M. Lloyd
On 04/20/2011 06:15 AM, Mircea Markus wrote: > Hi, > > At the moment Infinispan can enlist in a tx either as an XAResource or as an > Synchronization. > Do you see any situation in which somebody would want to use XAResource > integration *without* recovery? Well I imagine one might elect to sim

Re: [infinispan-dev] JBoss TS SNAPSHOT dependency in master...

2011-04-26 Thread David M. Lloyd
As a point of fact I believe AS7 is actually currently using 4.14.0-Final. On 04/26/2011 12:03 PM, Mircea Markus wrote: > As I answered on IRC: this is a test-scoped dependency introduced with > https://issues.jboss.org/browse/ISPN-1002 > The reason we want the snapshot is because this is where J

Re: [infinispan-dev] cache name in logs

2011-04-29 Thread David M. Lloyd
I would just use NDC or MDC honestly. NDC.push(cacheName); try { do user stuff; } finally { NDC.pop(); } Similar if you want to use an MDC key. On 04/29/2011 09:55 AM, Galder Zamarreño wrote: > > On Apr 28, 2011, at 11:47 PM, Manik Surtani wrote: > >> We do now support JBoss Logging. >>

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-03 Thread David M. Lloyd
On 05/03/2011 12:41 PM, Pete Muir wrote: > > On 2 May 2011, at 10:10, Manik Surtani wrote: > >> >> On 1 May 2011, at 13:38, Pete Muir wrote: >> > As in, user API? That's a little intrusive... e.g., put(K, V, cl) ? Not for put, since you have the class, just get, and I was thinking >>

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-04 Thread David M. Lloyd
On 05/03/2011 11:18 PM, "이희승 (Trustin Lee)" wrote: > By default, we could use the class loader that the current Unmarshaller > uses, and let user choose a class loader for a certain get() call. > > So, we need to deal with the two issues here: > > 1) Make sure that user can configure the default cl

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-04 Thread David M. Lloyd
On 05/04/2011 09:08 AM, Pete Muir wrote: > > On 4 May 2011, at 09:55, Dan Berindei wrote: > >> On Wed, May 4, 2011 at 7:18 AM, "이희승 (Trustin >> Lee)" wrote: >>> On 05/03/2011 09:33 PM, Sanne Grinovero wrote: 2011/5/3 "이희승 (Trustin Lee)": > On 05/03/2011 05:08 AM, Sanne Grinovero wrote:

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-05 Thread David M. Lloyd
On 05/05/2011 10:49 AM, David Bosschaert wrote: > On 05/05/2011 10:55, Pete Muir wrote: >> I talked about this with Emmanuel last night, and we were >> >> a) concerned about the pollution of the API that this implies >> b) not sure why we need to do this >> >> So I also spoke to Jason to understand

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-16 Thread David M. Lloyd
As a rule I've never cared about exploding the number of methods on an API class as long as: 1. There are few basic functions - i.e. get is get, and regardless of which overload we're talking about it behaves consistently - and the large number of methods is due mainly to overloads 2. The end u

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-16 Thread David M. Lloyd
I know, we can just attach the class loader to the cache! Okay, just kidding, but Galder is right, this conversation is going in circles. We already discussed that in this thread and a number of points were raised for and against. On 05/16/2011 01:20 PM, Adrian Cole wrote: > What about a helpe

Re: [infinispan-dev] Failure looking up the river marshaller under AS 7 environment

2011-05-31 Thread David M. Lloyd
Easiest solution is: Marshalling.getProvidedMarshallerFactory("river"); This will always use the JBMAR class loader. Otherwise you would have to make sure that the module from which you load the "river" protocol imports the river module like this: ... ... ... a

Re: [infinispan-dev] Failure looking up the river marshaller under AS 7 environment

2011-05-31 Thread David M. Lloyd
>> Using Marshalling.getProvidedMarshallerFactory() sounds like a better >> solution. Let me create a JIRA issue and send a pull request soon. >> >> On 06/01/2011 01:47 AM, David M. Lloyd wrote: >>> Easiest solution is: >>> >>> Marshalling.getProvidedM

Re: [infinispan-dev] Issue posted for JBoss Logging and slf4j

2011-06-20 Thread David M. Lloyd
On 06/20/2011 04:16 PM, Thomas P. Fuller wrote: > I've had an issue upgrading to CR5 and I was just about to ask about this. > > Basically when running infinispan CR5 in Grails I am seeing log messages > repeated two times whereas before upgrading I'd only see one. > > This is not a showstopper, bu

Re: [infinispan-dev] Issue posted for JBoss Logging and slf4j

2011-06-20 Thread David M. Lloyd
-annotations-1.0.jar > jgroups-2.12.0.Final.jar > lucene-core-3.2.0.jar > readme.txt > rhq-pluginAnnotations-3.0.1.jar > > Re: "Are all messages duplicated, or just Infinispan's?" > > All messages are duplicated, and I just wrote a quite test application &

Re: [infinispan-dev] New Logging rules!!! MUST READ

2011-06-28 Thread David M. Lloyd
On 06/28/2011 06:31 AM, Galder Zamarreño wrote: > > On Jun 21, 2011, at 11:54 AM, Manik Surtani wrote: > >> >> On 27 Apr 2011, at 14:18, Galder Zamarreño wrote: >> >>> Please note as well that this might require some IDE settings changes. I >>> had to enable annotation processing in IntelliJ to be

Re: [infinispan-dev] Logger lookup performance

2011-08-08 Thread David M. Lloyd
On 08/08/2011 05:06 AM, Sanne Grinovero wrote: > Hi all, > raising some attention here on Pete's suggestions; > over the weekend we fixed this bootstrap performance issue ISPN-1315, > which I had given the name "Reduce number of Logger instances being > created", > after looking at this profiler sc

Re: [infinispan-dev] trace vs log.isTraceEnabled

2011-09-28 Thread David M. Lloyd
On 09/28/2011 11:35 AM, Mircea Markus wrote: > Hi, > > I'm not aware of any convention on using trace vs log.isTraceEnabled() to > guard the trace statements. > > if (trace) log.trace("some request related stuff") > vs > if (log.isTraceEnabled()) log.trace("some request related stuff"); > > The fo

Re: [infinispan-dev] JBoss Logging upgrade breaking build

2011-10-23 Thread David M. Lloyd
On 10/23/2011 03:20 AM, Galder Zamarreño wrote: > Hi, > > This JBoss Logging upgrade is rather annoying for a couple of > reasons: > > 1. IDE integration is broken: Before we had a JBoss Logging Processor > as some dependency that allowed the logging processor to be found in > the classpath. Now th

Re: [infinispan-dev] JBoss Logging upgrade breaking build

2011-10-23 Thread David M. Lloyd
case. On 10/23/2011 01:59 PM, David M. Lloyd wrote: > On 10/23/2011 03:20 AM, Galder Zamarreño wrote: >> Hi, >> >> This JBoss Logging upgrade is rather annoying for a couple of >> reasons: >> >> 1. IDE integration is broken: Before we had a JBoss Logging Proc

Re: [infinispan-dev] JBoss Logging upgrade breaking build

2011-10-24 Thread David M. Lloyd
.0.Beta3 and I'm getting the same errors in > the query module: > > [INFO] diagnostic error: All message bundles and message logger > messageMethods must have or inherit a message. > ... > [ERROR] error on execute: error during compilation > > Dan > > > On Mon, Oct

Re: [infinispan-dev] trace vs log.isTraceEnabled

2011-12-07 Thread David M. Lloyd
On 12/07/2011 11:10 AM, Sanne Grinovero wrote: > On 7 December 2011 17:04, Emmanuel Bernard wrote: >> >> Just to put some perspectives on things. >> Yes the code will waste some cycles checking for trace level but I'd rather >> have you guys invent a better distro or local / tx / lock algorithm t

Re: [infinispan-dev] AS7-4007 missing Infinispan dependency for clustered JPA second level cache

2012-03-06 Thread David M. Lloyd
On 03/06/2012 09:21 AM, Galder Zamarreño wrote: > This reminds me that we had a discussion about this a few months back: > http://goo.gl/DJLhB > > At the time, it wasn't clear whether you can use ModularClassResolver in a > non-module env. Seems like it's not possible. > > So, one option is to ha

Re: [infinispan-dev] [jboss-as7-dev] AS7-4007 missing Infinispan dependency for clustered JPA second level cache

2012-03-06 Thread David M. Lloyd
On 03/06/2012 01:02 PM, Galder Zamarreño wrote: > On Mar 6, 2012, at 6:31 PM, Paul Ferraro wrote: >> - Original Message - >>> From: "Jason T. Greene" >>> To: "David M. Lloyd" >>> Cc: "Galder Zamarreño", "Pau

Re: [infinispan-dev] [jboss-as7-dev] AS7-4007 missing Infinispan dependency for clustered JPA second level cache

2012-03-06 Thread David M. Lloyd
On 03/06/2012 01:27 PM, Galder Zamarreño wrote: > (***) I still don't fully understand how web apps don't have the same issue > as 2LC of not seeing Infinispan classes (Reminder: we're not talking about > the contents of the cache, but about the Infinispan classes themselves). It's possible that

Re: [infinispan-dev] Double+ buffering during value marshalling

2012-08-28 Thread David M. Lloyd
All I can contribute is that you cannot really avoid buffering in the marshaller, because for user data it uses constructs of the form: You generally cannot know without some form of buffering. There may be some optimizations which are possible that I haven't done yet, but I think as it

Re: [infinispan-dev] Double+ buffering during value marshalling

2012-08-31 Thread David M. Lloyd
er when I think we should allocate a single buffer > when needing to transfer several objects, wrap it in an RPC, prefix > with JGroups headers all with a single allocation - and possibly an > out-of-heap buffer to feed directly to a NIO2 network channel? > > Sanne > > On 28

Re: [infinispan-dev] Avoid Collections.emptySet() / emptyMap() / emptyList

2012-10-19 Thread David M. Lloyd
Also be aware that JBMAR has specific optimizations for the JDK empty collections - they are represented by a single byte in the stream. On 10/19/2012 11:28 AM, Dan Berindei wrote: > Galder, what JDK are you using? OpenJDK 1.7 uses > EmptyIterator.EMPTY_ITERATOR since 2007: > > http://hg.openjdk.

Re: [infinispan-dev] Avoid Collections.emptySet() / emptyMap() / emptyList

2012-10-22 Thread David M. Lloyd
On 10/22/2012 01:41 AM, Galder Zamarreño wrote: > > On Oct 19, 2012, at 7:20 PM, David M. Lloyd wrote: > >> Also be aware that JBMAR has specific optimizations for the JDK empty >> collections - they are represented by a single byte in the stream. > > Well, it's

Re: [infinispan-dev] Avoid Collections.emptySet() / emptyMap() / emptyList

2012-10-23 Thread David M. Lloyd
On 10/23/2012 07:39 AM, Galder Zamarreño wrote: > > On Oct 22, 2012, at 3:40 PM, David M. Lloyd wrote: > >> On 10/22/2012 01:41 AM, Galder Zamarreño wrote: >>> >>> On Oct 19, 2012, at 7:20 PM, David M. Lloyd wrote: >>> >>>> Also be aware t

Re: [infinispan-dev] More verbose logging

2013-02-19 Thread David M. Lloyd
This is one reason why I recommend logging using categories versus class names. If you confine types of trace logging to specific categories which correspond to logical processes, then this allows the user to surgically select what information they wish to receive. It is very often the case t

Re: [infinispan-dev] CHM or CHMv8?

2013-04-18 Thread David M. Lloyd
On 04/18/2013 09:35 PM, Manik Surtani wrote: > Guys, > > Based on some recent micro benchmarks I've been doing, I've seen: > > MapStressTest configuration: capacity 10, test running time 60 seconds > Testing mixed read/write performance with capacity 100,000, keys 300,000, > concurrency level

Re: [infinispan-dev] CHM or CHMv8?

2013-04-19 Thread David M. Lloyd
On 04/19/2013 05:17 AM, Sanne Grinovero wrote: > On 19 April 2013 11:10, Dan Berindei wrote: >> >> >> >> On Fri, Apr 19, 2013 at 12:58 PM, Sanne Grinovero >> wrote: >>> >>> On 19 April 2013 10:37, Dan Berindei wrote: Testing mixed read/write performance with capacity 10, keys 30, >>

Re: [infinispan-dev] CHM or CHMv8?

2013-04-19 Thread David M. Lloyd
On 04/19/2013 08:22 AM, Sanne Grinovero wrote: > On 19 April 2013 13:52, David M. Lloyd wrote: >> On 04/19/2013 05:17 AM, Sanne Grinovero wrote: >>> On 19 April 2013 11:10, Dan Berindei wrote: >>>> >>>> >>>> >>>> On Fri, Apr 19

Re: [infinispan-dev] CHM or CHMv8?

2013-04-22 Thread David M. Lloyd
gt; > > On Fri, Apr 19, 2013 at 4:32 PM, David M. Lloyd <mailto:david.ll...@redhat.com>> wrote: > > On 04/19/2013 08:22 AM, Sanne Grinovero wrote: > > On 19 April 2013 13:52, David M. Lloyd <mailto:david.ll...@redhat.com>> wrote: > >> O