2h
comment Session Management in AJAX+CORS setting in Tomcat
Do you know how I can assign the UUID to the session when the object is created? Tomcat would try to create a session with a new session id for each request and I fear that this pollutes the session pool.
1d
comment Session Management in AJAX+CORS setting in Tomcat
Unfortunately not, it has multiple(different) pages
1d
asked Session Management in AJAX+CORS setting in Tomcat
Dec
10
comment apache tomcat catalina as maven dependency for CORS filter
I came here using Tomcat 7.0.37 in a normal webapp, however the above snipped initally did not work for me. The problem is that you need at least Tomcat 7.0.41 for the CORS filter to be available as you can see in the changelog for 7.0.41 at tomcat.apache.org/oldnews-2013.html
Nov
27
comment Cannot rename package in Intellij Idea
I was a bit surprised myself :)
Nov
27
answered Cannot rename package in Intellij Idea
Nov
21
comment In-memory batch buffer for writing objects to a database
Sure :) It would also prevent data stacking up in the queue
Nov
19
asked In-memory batch buffer for writing objects to a database
Nov
19
accepted Advanced message filter rules in Mozilla Thunderbird
Nov
8
accepted Java 8: Applying Stream map and filter in one go
Nov
6
comment Java 8: Applying Stream map and filter in one go
Well I assume the stream has to be processed two times, once for map and once for filter. I want to discard the unnessecary elements within the map operation, that should be faster in any case.
Nov
6
asked Java 8: Applying Stream map and filter in one go
Oct
17
comment Why does this print method work? shouldn't it fail?
The problem is that null does not have a type, so this results in a compiler error, because java doesn't know which overloaded method to call. First cast the value to a String: System.out.println((String) null);
Oct
17
answered Running JUnit tests in terminal
Oct
8
comment Foolproof detection of OutOfmemory in Java
Here are some examples: stackoverflow.com/questions/1759831/…
Oct
6
revised How to represent empty char in Java Character class
added 6 characters in body
Sep
24
awarded Autobiographer
Sep
12
comment How to read all lines of a file in parallel in Java 8
I changed the method I used for testing, I seem to be wrong, as I accidentally limited the result size to 200 before doing the final operation (forEach(System.out::println) on the resulting stream. Actually, Files.lines(Path) reads the given file as a sequential stream. Moreover, most of the time was actually spent reading the file and not on computations, plus I ran into some GC problems. I timed Files.lines(Path).toArray() vs a method using a MappedByteBuffer(readonly, 0, file.size). The results were actually the quite same, MappedByteBuffer a bit slower here and there.
Sep
12
accepted How to read all lines of a file in parallel in Java 8
Sep
7
comment How to read all lines of a file in parallel in Java 8
I edited the question to clarify that there is practically no seeking time - compared to a hard disk. Even if I add the 2 seconds for splitting the file, there is still > 18 seconds difference.
1 2 3 4 5