http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/hs_err_pid23423.log
----------------------------------------------------------------------
diff --git a/cayenne-web/hs_err_pid23423.log b/cayenne-web/hs_err_pid23423.log
new file mode 100644
index 0000000..b2354fc
--- /dev/null
+++ b/cayenne-web/hs_err_pid23423.log
@@ -0,0 +1,522 @@
+#
+# A fatal error has been detected by the Java Runtime Environment:
+#
+#  SIGSEGV (0xb) at pc=0x000000010d3b05e0, pid=23423, tid=0x0000000000001b03
+#
+# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 
1.8.0_121-b13)
+# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode bsd-amd64 
compressed oops)
+# Problematic frame:
+# V  [libjvm.dylib+0x3b05e0]
+#
+# Failed to write core dump. Core dumps have been disabled. To enable core 
dumping, try "ulimit -c unlimited" before starting Java again
+#
+# If you would like to submit a bug report, please visit:
+#   http://bugreport.java.com/bugreport/crash.jsp
+#
+
+---------------  T H R E A D  ---------------
+
+Current thread (0x00007fc776007800):  JavaThread "main" [_thread_in_vm, 
id=6915, stack(0x0000700004f09000,0x0000700005009000)]
+
+siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 
0x0000000000000024
+
+Registers:
+RAX=0x0000000117ce1aa0, RBX=0x00007fc776007800, RCX=0x00007fc774f036e8, 
RDX=0x0000000000000000
+RSP=0x0000700005006900, RBP=0x00007000050069f0, RSI=0x0000000000000008, 
RDI=0x00007fc774f03540
+R8 =0x00007fc776007800, R9 =0x0000000117e97bb8, R10=0x0000000117ce1aa0, 
R11=0xffffffff00000000
+R12=0x00000000000000b6, R13=0x00000007c00d5e00, R14=0x0000000000000003, 
R15=0x0000000000000000
+RIP=0x000000010d3b05e0, EFLAGS=0x0000000000010287, ERR=0x0000000000000004
+  TRAPNO=0x000000000000000e
+
+Top of Stack: (sp=0x0000700005006900)
+0x0000700005006900:   0000700005006950 000000010d3b16f8
+0x0000700005006910:   0000001400000001 0000000000000000
+0x0000700005006920:   0000000117ce2ee0 0000000117ce1aa0
+0x0000700005006930:   0d8cbe4076007800 0000000100000001
+0x0000700005006940:   00000000000005e0 00007fc774f03220
+0x0000700005006950:   00007fc774f036e0 000000010d3b23e7
+0x0000700005006960:   00007fc776007800 000000010d44e634
+0x0000700005006970:   0000000117e99328 0000000117e9b470
+0x0000700005006980:   0000000000000000 0000000000000000
+0x0000700005006990:   00007fc776007800 00007fc774f03540
+0x00007000050069a0:   00007fc774f03640 00007fc774f036e0
+0x00007000050069b0:   00007fc774f03728 00000000000000d8
+0x00007000050069c0:   0000700005006a10 00007fc774f03220
+0x00007000050069d0:   00000000000000b6 00000007c00d5e00
+0x00007000050069e0:   0000000000000018 0000000000000000
+0x00007000050069f0:   0000700005006a70 000000010d3b0a5e
+0x0000700005006a00:   0000000100000002 00007fc776007800
+0x0000700005006a10:   00007fc776007800 00007fc774f03540
+0x0000700005006a20:   00007fc774f03640 00007fc774f036e0
+0x0000700005006a30:   00007fc774f03728 00000000000000d8
+0x0000700005006a40:   0000700005006c70 00007fc776007800
+0x0000700005006a50:   0000700005006b68 0000000000000000
+0x0000700005006a60:   0000700005006b00 0000000000000001
+0x0000700005006a70:   0000700005006c60 000000010d2c1667
+0x0000700005006a80:   0000700005006dd0 00000007c00d59e8
+0x0000700005006a90:   0000000105006b00 00000007c00d5e00
+0x0000700005006aa0:   00007fc776007800 00007fc774f03120
+0x0000700005006ab0:   00007fc774f03150 00007fc774f03160
+0x0000700005006ac0:   00007fc774f03538 00000000000003d8
+0x0000700005006ad0:   0000700005006b00 000000010d2c0158
+0x0000700005006ae0:   00000000000000b4 0000700005006dd0
+0x0000700005006af0:   00000007c00d5900 00000007c00d59e8 
+
+Instructions: (pc=0x000000010d3b05e0)
+0x000000010d3b05c0:   44 03 00 00 48 8b 85 38 ff ff ff 4e 8b 7c f0 08
+0x000000010d3b05d0:   48 c7 45 90 00 00 00 00 48 c7 45 98 00 00 00 00
+0x000000010d3b05e0:   41 83 7f 24 f6 7f 9a 49 8b 47 08 0f b7 48 22 48
+0x000000010d3b05f0:   8b 70 08 48 8b 54 ce 50 0f b7 40 24 48 8b 4c c6 
+
+Register to memory mapping:
+
+RAX=0x0000000117ce1aa0 is pointing into metadata
+RBX=0x00007fc776007800 is a thread
+RCX=0x00007fc774f036e8 is an unknown value
+RDX=0x0000000000000000 is an unknown value
+RSP=0x0000700005006900 is pointing into the stack for thread: 
0x00007fc776007800
+RBP=0x00007000050069f0 is pointing into the stack for thread: 
0x00007fc776007800
+RSI=0x0000000000000008 is an unknown value
+RDI=0x00007fc774f03540 is an unknown value
+R8 =0x00007fc776007800 is a thread
+R9 =0x0000000117e97bb8 is pointing into metadata
+R10=0x0000000117ce1aa0 is pointing into metadata
+R11=0xffffffff00000000 is an unknown value
+R12=0x00000000000000b6 is an unknown value
+R13=0x00000007c00d5e00 is pointing into metadata
+R14=0x0000000000000003 is an unknown value
+R15=0x0000000000000000 is an unknown value
+
+
+Stack: [0x0000700004f09000,0x0000700005009000],  sp=0x0000700005006900,  free 
space=1014k
+Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
+V  [libjvm.dylib+0x3b05e0]
+V  [libjvm.dylib+0x3b0a5e]
+V  [libjvm.dylib+0x2c1667]
+V  [libjvm.dylib+0x2c1765]
+V  [libjvm.dylib+0x2c179d]
+V  [libjvm.dylib+0x2c1ec3]
+V  [libjvm.dylib+0x2e9428]
+j  org.apache.cayenne.web.CayenneFilterTest.testDoFilter()V+95
+v  ~StubRoutines::call_stub
+V  [libjvm.dylib+0x2ed9d6]
+V  [libjvm.dylib+0x4d26c4]
+V  [libjvm.dylib+0x4d2bf8]
+V  [libjvm.dylib+0x345db8]
+j  
sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
+j  
sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
+j  
sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
+j  
java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
+j  
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall()Ljava/lang/Object;+15
+j  
org.junit.internal.runners.model.ReflectiveCallable.run()Ljava/lang/Object;+1
+j  
org.junit.runners.model.FrameworkMethod.invokeExplosively(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+10
+j  org.junit.internal.runners.statements.InvokeMethod.evaluate()V+12
+j  
org.junit.runners.ParentRunner.runLeaf(Lorg/junit/runners/model/Statement;Lorg/junit/runner/Description;Lorg/junit/runner/notification/RunNotifier;)V+17
+j  
org.junit.runners.BlockJUnit4ClassRunner.runChild(Lorg/junit/runners/model/FrameworkMethod;Lorg/junit/runner/notification/RunNotifier;)V+30
+j  
org.junit.runners.BlockJUnit4ClassRunner.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6
+j  org.junit.runners.ParentRunner$3.run()V+12
+j  org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1
+j  
org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+44
+j  
org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2
+j  org.junit.runners.ParentRunner$2.evaluate()V+8
+j  
org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20
+j  
org.junit.runner.JUnitCore.run(Lorg/junit/runner/Runner;)Lorg/junit/runner/Result;+37
+j  
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs([Ljava/lang/String;Ljava/lang/String;IZ)I+146
+j  
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(Lcom/intellij/rt/execution/junit/IdeaTestRunner;[Ljava/lang/String;Ljava/util/ArrayList;Ljava/lang/String;IZ)I+20
+j  
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart([Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/lang/String;)I+116
+j  com.intellij.rt.execution.junit.JUnitStarter.main([Ljava/lang/String;)V+116
+v  ~StubRoutines::call_stub
+V  [libjvm.dylib+0x2ed9d6]
+V  [libjvm.dylib+0x4d26c4]
+V  [libjvm.dylib+0x4d2bf8]
+V  [libjvm.dylib+0x345db8]
+j  
sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
+j  
sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
+j  
sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
+j  
java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
+j  com.intellij.rt.execution.application.AppMain.main([Ljava/lang/String;)V+170
+v  ~StubRoutines::call_stub
+V  [libjvm.dylib+0x2ed9d6]
+V  [libjvm.dylib+0x3247ce]
+V  [libjvm.dylib+0x31d545]
+C  [java+0x3931]  JavaMain+0x9c4
+C  [libsystem_pthread.dylib+0x393b]  _pthread_body+0xb4
+C  [libsystem_pthread.dylib+0x3887]  _pthread_body+0x0
+C  [libsystem_pthread.dylib+0x308d]  thread_start+0xd
+C  0x0000000000000000
+
+Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
+j  org.apache.cayenne.web.CayenneFilterTest.testDoFilter()V+95
+v  ~StubRoutines::call_stub
+j  
sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
+j  
sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
+j  
sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
+j  
java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
+j  
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall()Ljava/lang/Object;+15
+j  
org.junit.internal.runners.model.ReflectiveCallable.run()Ljava/lang/Object;+1
+j  
org.junit.runners.model.FrameworkMethod.invokeExplosively(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+10
+j  org.junit.internal.runners.statements.InvokeMethod.evaluate()V+12
+j  
org.junit.runners.ParentRunner.runLeaf(Lorg/junit/runners/model/Statement;Lorg/junit/runner/Description;Lorg/junit/runner/notification/RunNotifier;)V+17
+j  
org.junit.runners.BlockJUnit4ClassRunner.runChild(Lorg/junit/runners/model/FrameworkMethod;Lorg/junit/runner/notification/RunNotifier;)V+30
+j  
org.junit.runners.BlockJUnit4ClassRunner.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6
+j  org.junit.runners.ParentRunner$3.run()V+12
+j  org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1
+j  
org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+44
+j  
org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2
+j  org.junit.runners.ParentRunner$2.evaluate()V+8
+j  
org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20
+j  
org.junit.runner.JUnitCore.run(Lorg/junit/runner/Runner;)Lorg/junit/runner/Result;+37
+j  
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs([Ljava/lang/String;Ljava/lang/String;IZ)I+146
+j  
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(Lcom/intellij/rt/execution/junit/IdeaTestRunner;[Ljava/lang/String;Ljava/util/ArrayList;Ljava/lang/String;IZ)I+20
+j  
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart([Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/lang/String;)I+116
+j  com.intellij.rt.execution.junit.JUnitStarter.main([Ljava/lang/String;)V+116
+v  ~StubRoutines::call_stub
+j  
sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
+j  
sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
+j  
sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
+j  
java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
+j  com.intellij.rt.execution.application.AppMain.main([Ljava/lang/String;)V+170
+v  ~StubRoutines::call_stub
+
+---------------  P R O C E S S  ---------------
+
+Java Threads: ( => current thread )
+  0x00007fc776858800 JavaThread "Monitor Ctrl-Break" daemon 
[_thread_in_native, id=19459, stack(0x0000700005db6000,0x0000700005eb6000)]
+  0x00007fc776842000 JavaThread "Service Thread" daemon [_thread_blocked, 
id=18435, stack(0x0000700005bb0000,0x0000700005cb0000)]
+  0x00007fc77601c000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, 
id=17923, stack(0x0000700005aad000,0x0000700005bad000)]
+  0x00007fc77601b800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, 
id=17411, stack(0x00007000059aa000,0x0000700005aaa000)]
+  0x00007fc77501e000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, 
id=16899, stack(0x00007000058a7000,0x00007000059a7000)]
+  0x00007fc77601a000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, 
id=16387, stack(0x00007000057a4000,0x00007000058a4000)]
+  0x00007fc776019000 JavaThread "Finalizer" daemon [_thread_blocked, id=12291, 
stack(0x000070000561e000,0x000070000571e000)]
+  0x00007fc776016800 JavaThread "Reference Handler" daemon [_thread_blocked, 
id=11779, stack(0x000070000551b000,0x000070000561b000)]
+=>0x00007fc776007800 JavaThread "main" [_thread_in_vm, id=6915, 
stack(0x0000700004f09000,0x0000700005009000)]
+
+Other Threads:
+  0x00007fc775045800 VMThread [stack: 0x0000700005418000,0x0000700005518000] 
[id=11267]
+  0x00007fc77501f000 WatcherThread [stack: 
0x0000700005cb3000,0x0000700005db3000] [id=18947]
+
+VM state:not at safepoint (normal execution)
+
+VM Mutex/Monitor currently owned by a thread: None
+
+Heap:
+ PSYoungGen      total 76288K, used 18354K [0x000000076ab00000, 
0x0000000770000000, 0x00000007c0000000)
+  eden space 65536K, 28% used 
[0x000000076ab00000,0x000000076bcecb20,0x000000076eb00000)
+  from space 10752K, 0% used 
[0x000000076f580000,0x000000076f580000,0x0000000770000000)
+  to   space 10752K, 0% used 
[0x000000076eb00000,0x000000076eb00000,0x000000076f580000)
+ ParOldGen       total 175104K, used 0K [0x00000006c0000000, 
0x00000006cab00000, 0x000000076ab00000)
+  object space 175104K, 0% used 
[0x00000006c0000000,0x00000006c0000000,0x00000006cab00000)
+ Metaspace       used 6791K, capacity 6964K, committed 7040K, reserved 1056768K
+  class space    used 823K, capacity 891K, committed 896K, reserved 1048576K
+
+Card table byte_map: [0x000000010e362000,0x000000010eb63000] byte_map_base: 
0x000000010ad62000
+
+Marking Bits: (ParMarkBitMap*) 0x000000010d8f0d30
+ Begin Bits: [0x000000010f0b9000, 0x00000001130b9000)
+ End Bits:   [0x00000001130b9000, 0x00000001170b9000)
+
+Polling page: 0x000000010c686000
+
+CodeCache: size=245760Kb used=2348Kb max_used=2348Kb free=243411Kb
+ bounds [0x0000000118373000, 0x00000001185e3000, 0x0000000127373000]
+ total_blobs=817 nmethods=539 adapters=192
+ compilation: enabled
+
+Compilation events (10 events):
+Event: 0.532 Thread 0x00007fc77601c000  535       3       
java.lang.ClassLoader::compareCerts (149 bytes)
+Event: 0.533 Thread 0x00007fc77601c000 nmethod 535 0x00000001185b1490 code 
[0x00000001185b1660, 0x00000001185b1f18]
+Event: 0.534 Thread 0x00007fc77601c000  536       1       
java.lang.reflect.Constructor::getDeclaringClass (5 bytes)
+Event: 0.534 Thread 0x00007fc77601c000 nmethod 536 0x00000001185ba8d0 code 
[0x00000001185baa20, 0x00000001185bab30]
+Event: 0.537 Thread 0x00007fc77601c000  537       3       
java.lang.Class::getReflectionFactory (26 bytes)
+Event: 0.537 Thread 0x00007fc77601c000 nmethod 537 0x00000001185ba250 code 
[0x00000001185ba3e0, 0x00000001185ba7c8]
+Event: 0.541 Thread 0x00007fc77601c000  538       3       
java.lang.Class::checkMemberAccess (49 bytes)
+Event: 0.541 Thread 0x00007fc77601c000 nmethod 538 0x00000001185b9990 code 
[0x00000001185b9b40, 0x00000001185ba098]
+Event: 0.543 Thread 0x00007fc77601c000  539       3       
java.util.zip.ZipFile::getZipEntry (236 bytes)
+Event: 0.544 Thread 0x00007fc77601c000 nmethod 539 0x00000001185be7d0 code 
[0x00000001185bea20, 0x00000001185bf5a8]
+
+GC Heap History (0 events):
+No events
+
+Deoptimization events (0 events):
+No events
+
+Internal exceptions (9 events):
+Event: 0.033 Thread 0x00007fc776007800 Exception <a 
'java/lang/NoSuchMethodError': Method 
sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or 
signature does not match> (0x000000076ab07ca8) thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspo
+Event: 0.033 Thread 0x00007fc776007800 Exception <a 
'java/lang/NoSuchMethodError': Method 
sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not 
match> (0x000000076ab07f90) thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/pri
+Event: 0.147 Thread 0x00007fc776007800 Exception <a 
'java/io/FileNotFoundException'> (0x000000076aef6658) thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/prims/jni.cpp,
 line 709]
+Event: 0.158 Thread 0x00007fc776007800 Exception <a 
'java/security/PrivilegedActionException'> (0x000000076af4b5d8) thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/prims/jvm.cpp,
 line 1390]
+Event: 0.158 Thread 0x00007fc776007800 Exception <a 
'java/security/PrivilegedActionException'> (0x000000076af4b7e8) thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/prims/jvm.cpp,
 line 1390]
+Event: 0.158 Thread 0x00007fc776007800 Exception <a 
'java/security/PrivilegedActionException'> (0x000000076af4ed00) thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/prims/jvm.cpp,
 line 1390]
+Event: 0.158 Thread 0x00007fc776007800 Exception <a 
'java/security/PrivilegedActionException'> (0x000000076af4ef10) thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/prims/jvm.cpp,
 line 1390]
+Event: 0.420 Thread 0x00007fc776007800 Exception <a 
'java/lang/NoSuchFieldError': method resolution failed> (0x000000076b614500) 
thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/prims/methodHandles.cpp,
 line 1146]
+Event: 0.422 Thread 0x00007fc776007800 Exception <a 
'java/lang/NoSuchFieldError': method resolution failed> (0x000000076b621bf0) 
thrown at 
[/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/hotspot/src/share/vm/prims/methodHandles.cpp,
 line 1146]
+
+Events (10 events):
+Event: 0.546 loading class java/io/UnsupportedEncodingException
+Event: 0.546 loading class java/io/UnsupportedEncodingException done
+Event: 0.546 loading class com/mockrunner/base/NestedApplicationException
+Event: 0.546 loading class com/mockrunner/base/NestedApplicationException done
+Event: 0.547 loading class java/text/ParseException
+Event: 0.547 loading class java/text/ParseException done
+Event: 0.547 loading class com/mockrunner/mock/web/MockServletInputStream
+Event: 0.547 loading class com/mockrunner/mock/web/MockServletInputStream done
+Event: 0.548 loading class javax/servlet/ServletInputStream
+Event: 0.548 loading class javax/servlet/ServletInputStream done
+
+
+Dynamic libraries:
+0x000000001a9f5000     
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
+0x000000001a9f5000     
/System/Library/Frameworks/Security.framework/Versions/A/Security
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
+0x000000001a9f5000     /usr/lib/libz.1.dylib
+0x000000001a9f5000     /usr/lib/libSystem.B.dylib
+0x000000001a9f5000     /usr/lib/libobjc.A.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
+0x000000001a9f5000     
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
+0x000000001a9f5000     
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
+0x000000001a9f5000     
/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/DFRFoundation.framework/Versions/A/DFRFoundation
+0x000000001a9f5000     /usr/lib/libenergytrace.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
+0x000000001a9f5000     
/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
+0x000000001a9f5000     /usr/lib/libScreenReader.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
+0x000000001a9f5000     
/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
+0x000000001a9f5000     
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
+0x000000001a9f5000     
/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
+0x000000001a9f5000     /usr/lib/libicucore.A.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
+0x000000001a9f5000     /usr/lib/libauto.dylib
+0x000000001a9f5000     /usr/lib/libxml2.2.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
+0x000000001a9f5000     
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
+0x000000001a9f5000     
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
+0x000000001a9f5000     /usr/lib/liblangid.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
+0x000000001a9f5000     
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
+0x000000001a9f5000     /usr/lib/libDiagnosticMessagesClient.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
+0x000000001a9f5000     
/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
+0x000000001a9f5000     
/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
+0x000000001a9f5000     
/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
+0x000000001a9f5000     /usr/lib/libarchive.2.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
+0x000000001a9f5000     
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
+0x000000001a9f5000     /usr/lib/libCRFSuite.dylib
+0x000000001a9f5000     /usr/lib/libc++.1.dylib
+0x000000001a9f5000     /usr/lib/libc++abi.dylib
+0x000000001a9f5000     /usr/lib/system/libcache.dylib
+0x000000001a9f5000     /usr/lib/system/libcommonCrypto.dylib
+0x000000001a9f5000     /usr/lib/system/libcompiler_rt.dylib
+0x000000001a9f5000     /usr/lib/system/libcopyfile.dylib
+0x000000001a9f5000     /usr/lib/system/libcorecrypto.dylib
+0x000000001a9f5000     /usr/lib/system/libdispatch.dylib
+0x000000001a9f5000     /usr/lib/system/libdyld.dylib
+0x000000001a9f5000     /usr/lib/system/libkeymgr.dylib
+0x000000001a9f5000     /usr/lib/system/liblaunch.dylib
+0x000000001a9f5000     /usr/lib/system/libmacho.dylib
+0x000000001a9f5000     /usr/lib/system/libquarantine.dylib
+0x000000001a9f5000     /usr/lib/system/libremovefile.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_asl.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_blocks.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_c.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_configuration.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_coreservices.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_coretls.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_dnssd.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_info.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_kernel.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_m.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_malloc.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_network.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_networkextension.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_notify.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_platform.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_pthread.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_sandbox.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_secinit.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_symptoms.dylib
+0x000000001a9f5000     /usr/lib/system/libsystem_trace.dylib
+0x000000001a9f5000     /usr/lib/system/libunwind.dylib
+0x000000001a9f5000     /usr/lib/system/libxpc.dylib
+0x000000001a9f5000     /usr/lib/libbsm.0.dylib
+0x000000001a9f5000     /usr/lib/system/libkxld.dylib
+0x000000001a9f5000     /usr/lib/libcoretls.dylib
+0x000000001a9f5000     /usr/lib/libcoretls_cfhelpers.dylib
+0x000000001a9f5000     /usr/lib/libOpenScriptingUtil.dylib
+0x000000001a9f5000     /usr/lib/libpam.2.dylib
+0x000000001a9f5000     /usr/lib/libsqlite3.dylib
+0x000000001a9f5000     /usr/lib/libxar.1.dylib
+0x000000001a9f5000     /usr/lib/libbz2.1.0.dylib
+0x000000001a9f5000     /usr/lib/liblzma.5.dylib
+0x000000001a9f5000     /usr/lib/libnetwork.dylib
+0x000000001a9f5000     /usr/lib/libpcap.A.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
+0x000000001a9f5000     
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
+0x000000001a9f5000     
/System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
+0x000000001a9f5000     /usr/lib/libmecabra.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
+0x000000001a9f5000     /usr/lib/libcompression.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
+0x000000001a9f5000     /usr/lib/libcups.2.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
+0x000000001a9f5000     /System/Library/Frameworks/GSS.framework/Versions/A/GSS
+0x000000001a9f5000     /usr/lib/libresolv.9.dylib
+0x000000001a9f5000     /usr/lib/libiconv.2.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
+0x000000001a9f5000     /usr/lib/libheimdal-asn1.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
+0x000000001a9f5000     
/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
+0x000000001a9f5000     
/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
+0x000000001a9f5000     /usr/lib/libmarisa.dylib
+0x000000001a9f5000     /usr/lib/libChineseTokenizer.dylib
+0x000000001a9f5000     /usr/lib/libcmph.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
+0x000000001a9f5000     
/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
+0x000000001a9f5000     /usr/lib/libxslt.1.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/TextureIO.framework/Versions/A/TextureIO
+0x000000001a9f5000     
/System/Library/Frameworks/Metal.framework/Versions/A/Metal
+0x000000001a9f5000     /usr/lib/libate.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/GPUCompiler.framework/libmetal_timestamp.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
+0x000000001a9f5000     
/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
+0x000000001a9f5000     /usr/lib/libFosl_dynamic.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
+0x000000001a9f5000     
/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
+0x000000001a9f5000     
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
+0x000000001a9f5000     
/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/CoreUtils.framework/Versions/A/CoreUtils
+0x000000001a9f5000     
/System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi
+0x000000001a9f5000     
/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth
+0x000000001a9f5000     
/System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
+0x000000001a9f5000     
/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary
+0x000000005230d000     
/System/Library/CoreServices/Encodings/libCyrillicConverter.dylib
+0x000000010d000000     
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/server/libjvm.dylib
+0x000000001a9f5000     /usr/lib/libstdc++.6.dylib
+0x000000010c643000     
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libverify.dylib
+0x000000010c651000     
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libjava.dylib
+0x000000010c690000     
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libzip.dylib
+0x000000010c7e3000     
/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport
+0x0000000128324000     
/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation
+0x0000000128339000     
/System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
+0x0000000128346000     
/System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
+0x000000001a9f5000     
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
+0x0000000129c4b000     /Applications/IntelliJ IDEA 
CE.app/Contents/bin/libbreakgen64.jnilib
+0x0000000129c50000     
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libnet.dylib
+
+VM Arguments:
+jvm_args: -ea -Didea.launcher.port=7538 
-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin 
-Dfile.encoding=UTF-8 
+java_command: com.intellij.rt.execution.application.AppMain 
com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 
org.apache.cayenne.web.CayenneFilterTest,testDoFilter
+java_class_path (initial): /Applications/IntelliJ IDEA 
CE.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA 
CE.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_1
 
21.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/rt.jar:/Library/
 Java
+Launcher Type: SUN_STANDARD
+
+Environment Variables:
+PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/apache-maven-3.5.0/bin
+SHELL=/bin/bash
+
+Signal Handlers:
+SIGSEGV: [libjvm.dylib+0x5b1141], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_ONSTACK|SA_RESTART|SA_SIGINFO
+SIGBUS: [libjvm.dylib+0x5b1141], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGFPE: [libjvm.dylib+0x487bc4], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGPIPE: [libjvm.dylib+0x487bc4], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGXFSZ: [libjvm.dylib+0x487bc4], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGILL: [libjvm.dylib+0x487bc4], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
+SIGUSR2: [libjvm.dylib+0x4876e2], sa_mask[0]=00100000000000000000000000000000, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGHUP: [libjvm.dylib+0x485cb9], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGINT: [libjvm.dylib+0x485cb9], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGTERM: [libjvm.dylib+0x485cb9], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+SIGQUIT: [libjvm.dylib+0x485cb9], sa_mask[0]=11111111011111110111111111111111, 
sa_flags=SA_RESTART|SA_SIGINFO
+
+
+---------------  S Y S T E M  ---------------
+
+OS:Bsduname:Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 
PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
+rlimit: STACK 8192k, CORE 0k, NPROC 709, NOFILE 10240, AS infinity
+load average:1.61 1.70 1.87
+
+CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 42 stepping 
7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, 
aes, clmul, tsc, tscinvbit
+
+Memory: 4k page, physical 16777216k(2784952k free)
+
+/proc/meminfo:
+
+
+vm_info: Java HotSpot(TM) 64-Bit Server VM (25.121-b13) for bsd-amd64 JRE 
(1.8.0_121-b13), built on Dec 12 2016 20:39:32 by "java_re" with gcc 4.2.1 
(Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
+
+time: Wed Nov  1 13:24:00 2017
+elapsed time: 0 seconds (0d 0h 0m 0s)
+

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-web/pom.xml b/cayenne-web/pom.xml
index 46e7337..89840d6 100644
--- a/cayenne-web/pom.xml
+++ b/cayenne-web/pom.xml
@@ -13,26 +13,9 @@
     <name>cayenne-web: Cayenne Web Extensions</name>
     <packaging>jar</packaging>
 
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>javax.servlet</groupId>
-                <artifactId>servlet-api</artifactId>
-                <scope>provided</scope>
-                <optional>true</optional>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.cayenne</groupId>
-            <artifactId>cayenne-di</artifactId>
-            <version>${project.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cayenne</groupId>
             <artifactId>cayenne-server</artifactId>
             <version>${project.version}</version>
             <scope>compile</scope>
@@ -55,6 +38,13 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.cayenne</groupId>
+            <artifactId>cayenne-server</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.mockrunner</groupId>
             <artifactId>mockrunner-servlet</artifactId>
         </dependency>
@@ -75,5 +65,27 @@
         </dependency>
     </dependencies>
 
-
+    <build>
+        <plugins>
+            <!-- This ensures LICENSE and NOTICE inclusion in all jars -->
+            <plugin>
+                <artifactId>maven-remote-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>process</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration> 
<suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                    </configuration> -->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/main/java/org/apache/cayenne/web/CayenneFilter.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/main/java/org/apache/cayenne/web/CayenneFilter.java 
b/cayenne-web/src/main/java/org/apache/cayenne/web/CayenneFilter.java
new file mode 100644
index 0000000..0bddc67
--- /dev/null
+++ b/cayenne-web/src/main/java/org/apache/cayenne/web/CayenneFilter.java
@@ -0,0 +1,124 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import org.apache.cayenne.configuration.CayenneRuntime;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.di.Module;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * A filter that creates a Cayenne server runtime, possibly including custom 
modules. By
+ * default runtime includes {@link ServerModule} and {@link WebModule}. Any 
custom modules
+ * are loaded after the two standard ones to allow custom service overrides. 
Filter
+ * initialization parameters:
+ * <ul>
+ * <li>configuration-location - (optional) a name of Cayenne configuration XML 
file that
+ * will be used to load Cayenne stack. If missing, the filter name will be 
used to derive
+ * the location. ".xml" extension will be appended to the filter name to get 
the location,
+ * so a filter named "cayenne-foo" will result in location "cayenne-foo.xml".
+ * <li>extra-modules - (optional) a comma or space-separated list of class 
names, with
+ * each class implementing {@link Module} interface. These are the custom 
modules loaded
+ * after the two standard ones that allow users to override any Cayenne 
runtime aspects,
+ * e.g. {@link RequestHandler}. Each custom module must have a no-arg 
constructor.
+ * </ul>
+ * <p>
+ * CayenneFilter is a great utility to quickly start a Cayenne application. 
More advanced
+ * apps most likely will not use it, relying on their own configuration 
mechanism (such as
+ * Guice, Spring, etc.)
+ * 
+ * @since 3.1
+ */
+public class CayenneFilter implements Filter {
+
+    protected ServletContext servletContext;
+
+    public void init(FilterConfig config) throws ServletException {
+
+        checkAlreadyConfigured(config.getServletContext());
+
+        this.servletContext = config.getServletContext();
+
+        WebConfiguration configAdapter = new WebConfiguration(config);
+
+        String configurationLocation = 
configAdapter.getConfigurationLocation();
+        Collection<Module> modules = configAdapter.createModules();
+        modules.addAll(getAdditionalModules());
+
+        ServerRuntime runtime = ServerRuntime.builder()
+                .addConfig(configurationLocation)
+                .addModules(modules).build();
+
+        WebUtil.setCayenneRuntime(config.getServletContext(), runtime);
+    }
+
+    /**
+     * Subclasses may override this to specify additional modules that should 
be included when creating the CayenneRuntime
+     * (in addition to those specified in the web.xml file).
+     * 
+     * @since 4.0
+     */
+    protected Collection<Module> getAdditionalModules() {
+               return new ArrayList<>();
+       }
+
+    protected void checkAlreadyConfigured(ServletContext context) throws 
ServletException {
+        // sanity check
+        if (WebUtil.getCayenneRuntime(context) != null) {
+            throw new ServletException(
+                    "CayenneRuntime is already configured in the servlet 
environment");
+        }
+    }
+
+    public void destroy() {
+        CayenneRuntime runtime = WebUtil.getCayenneRuntime(servletContext);
+
+        if (runtime != null) {
+            runtime.shutdown();
+        }
+    }
+
+    public void doFilter(
+            ServletRequest request,
+            ServletResponse response,
+            FilterChain chain) throws IOException, ServletException {
+
+        CayenneRuntime runtime = WebUtil.getCayenneRuntime(servletContext);
+        RequestHandler handler = 
runtime.getInjector().getInstance(RequestHandler.class);
+
+        handler.requestStart(request, response);
+        try {
+            chain.doFilter(request, response);
+        }
+        finally {
+            handler.requestEnd(request, response);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
 
b/cayenne-web/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..ddca4fc
--- /dev/null
+++ 
b/cayenne-web/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+##################################################################
+
+org.apache.cayenne.web.WebServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilterTest.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilterTest.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilterTest.java
new file mode 100644
index 0000000..f27ec88
--- /dev/null
+++ b/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilterTest.java
@@ -0,0 +1,173 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import com.mockrunner.mock.web.*;
+import org.apache.cayenne.configuration.CayenneRuntime;
+import org.apache.cayenne.configuration.Constants;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.di.Key;
+import org.apache.cayenne.di.Module;
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import static org.junit.Assert.*;
+
+public class CayenneFilterTest {
+
+    @Test
+       public void testInitWithFilterName() throws Exception {
+
+               MockFilterConfig config = new MockFilterConfig();
+               config.setFilterName("abc");
+
+               MockServletContext context = new MockServletContext();
+               config.setupServletContext(context);
+
+               CayenneFilter filter = new CayenneFilter();
+
+               assertNull(WebUtil.getCayenneRuntime(context));
+               filter.init(config);
+
+               CayenneRuntime runtime = WebUtil.getCayenneRuntime(context);
+               assertNotNull(runtime);
+
+               List<String> locations = runtime.getInjector().getInstance(
+                               Key.getListOf(String.class, 
Constants.SERVER_PROJECT_LOCATIONS_LIST));
+
+               assertEquals(Arrays.asList("abc.xml"), locations);
+       }
+
+    @Test
+       public void testInitWithLocation() throws Exception {
+
+               MockFilterConfig config = new MockFilterConfig();
+               config.setFilterName("abc");
+               
config.setInitParameter(WebConfiguration.CONFIGURATION_LOCATION_PARAMETER, 
"xyz");
+
+               MockServletContext context = new MockServletContext();
+               config.setupServletContext(context);
+
+               CayenneFilter filter = new CayenneFilter();
+               filter.init(config);
+
+               CayenneRuntime runtime = WebUtil.getCayenneRuntime(context);
+               assertNotNull(runtime);
+               List<String> locations = runtime.getInjector().getInstance(
+                               Key.getListOf(String.class, 
Constants.SERVER_PROJECT_LOCATIONS_LIST));
+
+               assertEquals(Arrays.asList("xyz"), locations);
+       }
+
+    @Test
+       public void testInitWithStandardModules() throws Exception {
+
+               MockFilterConfig config = new MockFilterConfig();
+               config.setFilterName("cayenne-abc");
+
+               MockServletContext context = new MockServletContext();
+               config.setupServletContext(context);
+
+               CayenneFilter filter = new CayenneFilter();
+
+               assertNull(WebUtil.getCayenneRuntime(context));
+               filter.init(config);
+
+               CayenneRuntime runtime = WebUtil.getCayenneRuntime(context);
+               assertNotNull(runtime);
+               List<String> locations = runtime.getInjector().getInstance(
+                               Key.getListOf(String.class, 
Constants.SERVER_PROJECT_LOCATIONS_LIST));
+
+               assertEquals(Arrays.asList("cayenne-abc.xml"), locations);
+               Collection<Module> modules = runtime.getModules();
+               assertEquals(3, modules.size());
+
+//             Was removed because now it is not in correct order. 
ServerModule and WebModule can change there positioins.
+//             Object[] marray = modules.toArray();
+//             assertTrue(marray[0] instanceof ServerModule);
+//             //               [2] is an inner class
+//             assertTrue(marray[1] instanceof WebModule);
+
+               RequestHandler handler = 
runtime.getInjector().getInstance(RequestHandler.class);
+               assertTrue(handler instanceof SessionContextRequestHandler);
+       }
+
+    @Test
+       public void testInitWithExtraModules() throws Exception {
+
+               MockFilterConfig config = new MockFilterConfig();
+               config.setFilterName("abc");
+               
config.setInitParameter(WebConfiguration.EXTRA_MODULES_PARAMETER, 
MockModule1.class.getName() + ","
+                               + MockModule2.class.getName());
+
+               MockServletContext context = new MockServletContext();
+               config.setupServletContext(context);
+
+               CayenneFilter filter = new CayenneFilter();
+               filter.init(config);
+
+               CayenneRuntime runtime = WebUtil.getCayenneRuntime(context);
+               assertNotNull(runtime);
+
+               Collection<Module> modules = runtime.getModules();
+               assertEquals(5, modules.size());
+
+//             Was removed because now it is not in correct order. 
ServerModule and WebModule can change there positioins.
+//             Object[] marray = modules.toArray();
+//             assertTrue(marray[0] instanceof ServerModule);
+//             // [4] is an inner class
+//             assertTrue(marray[1] instanceof WebModule);
+//             assertTrue(marray[2] instanceof MockModule1);
+//             assertTrue(marray[3] instanceof MockModule2);
+
+               RequestHandler handler = 
runtime.getInjector().getInstance(RequestHandler.class);
+               assertTrue(handler instanceof MockRequestHandler);
+       }
+
+    @Test
+       public void testDoFilter() throws Exception {
+               MockFilterConfig config = new MockFilterConfig();
+               config.setFilterName("abc");
+               
config.setInitParameter(WebConfiguration.EXTRA_MODULES_PARAMETER, 
CayenneFilter_DispatchModule.class.getName());
+
+               MockServletContext context = new MockServletContext();
+               config.setupServletContext(context);
+
+               CayenneFilter filter = new CayenneFilter();
+               filter.init(config);
+
+               CayenneRuntime runtime = WebUtil.getCayenneRuntime(context);
+               CayenneFilter_DispatchRequestHandler handler = 
(CayenneFilter_DispatchRequestHandler) runtime.getInjector()
+                               .getInstance(RequestHandler.class);
+
+               assertEquals(0, handler.getStarted());
+               assertEquals(0, handler.getEnded());
+
+               filter.doFilter(new MockHttpServletRequest(), new 
MockHttpServletResponse(), new MockFilterChain());
+               assertEquals(1, handler.getStarted());
+               assertEquals(1, handler.getEnded());
+//
+//             filter.doFilter(new MockHttpServletRequest(), new 
MockHttpServletResponse(), new MockFilterChain());
+//             assertEquals(2, handler.getStarted());
+//             assertEquals(2, handler.getEnded());
+       }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchModule.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchModule.java
 
b/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchModule.java
new file mode 100644
index 0000000..f805910
--- /dev/null
+++ 
b/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchModule.java
@@ -0,0 +1,29 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import org.apache.cayenne.di.Binder;
+import org.apache.cayenne.di.Module;
+
+public class CayenneFilter_DispatchModule implements Module {
+
+    public void configure(Binder binder) {
+        
binder.bind(RequestHandler.class).to(CayenneFilter_DispatchRequestHandler.class);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchRequestHandler.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchRequestHandler.java
 
b/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchRequestHandler.java
new file mode 100644
index 0000000..257472d
--- /dev/null
+++ 
b/cayenne-web/src/test/java/org/apache/cayenne/web/CayenneFilter_DispatchRequestHandler.java
@@ -0,0 +1,45 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+public class CayenneFilter_DispatchRequestHandler implements RequestHandler {
+
+    private int started;
+    private int ended;
+
+    public void requestEnd(ServletRequest request, ServletResponse response) {
+        ended++;
+    }
+
+    public void requestStart(ServletRequest request, ServletResponse response) 
{
+        started++;
+    }
+
+    public int getStarted() {
+        return started;
+    }
+
+    public int getEnded() {
+        return ended;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule1.java
----------------------------------------------------------------------
diff --git a/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule1.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule1.java
new file mode 100644
index 0000000..64d28e2
--- /dev/null
+++ b/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule1.java
@@ -0,0 +1,30 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import org.apache.cayenne.di.Binder;
+import org.apache.cayenne.di.Module;
+
+
+public class MockModule1 implements Module {
+
+    public void configure(Binder binder) {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule2.java
----------------------------------------------------------------------
diff --git a/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule2.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule2.java
new file mode 100644
index 0000000..0af8f2b
--- /dev/null
+++ b/cayenne-web/src/test/java/org/apache/cayenne/web/MockModule2.java
@@ -0,0 +1,31 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+
+import org.apache.cayenne.di.Binder;
+import org.apache.cayenne.di.Module;
+
+public class MockModule2 implements Module {
+
+    public void configure(Binder binder) {
+        binder.bind(RequestHandler.class).to(MockRequestHandler.class);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/MockRequestHandler.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/MockRequestHandler.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/MockRequestHandler.java
new file mode 100644
index 0000000..c38b171
--- /dev/null
+++ b/cayenne-web/src/test/java/org/apache/cayenne/web/MockRequestHandler.java
@@ -0,0 +1,33 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+
+public class MockRequestHandler implements RequestHandler {
+
+    public void requestEnd(ServletRequest request, ServletResponse response) {
+    }
+
+    public void requestStart(ServletRequest request, ServletResponse response) 
{
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/ServletContextHandlerTest.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/ServletContextHandlerTest.java
 
b/cayenne-web/src/test/java/org/apache/cayenne/web/ServletContextHandlerTest.java
new file mode 100644
index 0000000..a37a192
--- /dev/null
+++ 
b/cayenne-web/src/test/java/org/apache/cayenne/web/ServletContextHandlerTest.java
@@ -0,0 +1,124 @@
+///*****************************************************************
+// *   Licensed to the Apache Software Foundation (ASF) under one
+// *  or more contributor license agreements.  See the NOTICE file
+// *  distributed with this work for additional information
+// *  regarding copyright ownership.  The ASF licenses this file
+// *  to you under the Apache License, Version 2.0 (the
+// *  "License"); you may not use this file except in compliance
+// *  with the License.  You may obtain a copy of the License at
+// *
+// *    http://www.apache.org/licenses/LICENSE-2.0
+// *
+// *  Unless required by applicable law or agreed to in writing,
+// *  software distributed under the License is distributed on an
+// *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// *  KIND, either express or implied.  See the License for the
+// *  specific language governing permissions and limitations
+// *  under the License.
+// ****************************************************************/
+//package org.apache.cayenne.web;
+//
+//import com.mockrunner.mock.web.MockHttpServletRequest;
+//import com.mockrunner.mock.web.MockHttpServletResponse;
+//import com.mockrunner.mock.web.MockHttpSession;
+//import org.apache.cayenne.BaseContext;
+//import org.apache.cayenne.DataChannel;
+//import org.apache.cayenne.MockDataChannel;
+//import org.apache.cayenne.ObjectContext;
+//import org.apache.cayenne.configuration.ObjectContextFactory;
+//import org.apache.cayenne.di.DIBootstrap;
+//import org.apache.cayenne.di.Injector;
+//import org.apache.cayenne.di.Module;
+//import org.junit.Test;
+//
+//import static org.junit.Assert.*;
+//import static org.mockito.Mockito.mock;
+//
+//public class ServletContextHandlerTest {
+//
+//    @Test
+//    public void testRequestStart_bindContext() {
+//
+//        Module module = binder -> {
+//
+//            binder.bind(DataChannel.class).to(MockDataChannel.class);
+//            binder.bind(ObjectContextFactory.class).toInstance(
+//                    new ObjectContextFactory() {
+//
+//                        public ObjectContext createContext(DataChannel 
parent) {
+//                            return mock(ObjectContext.class);
+//                        }
+//
+//                        public ObjectContext createContext() {
+//                            return mock(ObjectContext.class);
+//                        }
+//                    });
+//        };
+//        Injector injector = DIBootstrap.createInjector(module);
+//        SessionContextRequestHandler handler = new 
SessionContextRequestHandler();
+//        injector.injectMembers(handler);
+//
+//        MockHttpSession session = new MockHttpSession();
+//
+//        BaseContext.bindThreadObjectContext(null);
+//
+//        try {
+//
+//            MockHttpServletRequest request1 = new MockHttpServletRequest();
+//            MockHttpServletResponse response1 = new 
MockHttpServletResponse();
+//            request1.setSession(session);
+//            handler.requestStart(request1, response1);
+//
+//            ObjectContext c1 = BaseContext.getThreadObjectContext();
+//            assertNotNull(c1);
+//
+//            handler.requestEnd(request1, response1);
+//
+//            try {
+//                BaseContext.getThreadObjectContext();
+//                fail("thread context not null");
+//            }
+//            catch (IllegalStateException e) {
+//                // expected
+//            }
+//
+//            MockHttpServletRequest request2 = new MockHttpServletRequest();
+//            MockHttpServletResponse response2 = new 
MockHttpServletResponse();
+//            request2.setSession(session);
+//            handler.requestStart(request2, response2);
+//
+//            ObjectContext c2 = BaseContext.getThreadObjectContext();
+//            assertSame(c1, c2);
+//
+//            handler.requestEnd(request2, response2);
+//            try {
+//                BaseContext.getThreadObjectContext();
+//                fail("thread context not null");
+//            }
+//            catch (IllegalStateException e) {
+//                // expected
+//            }
+//
+//            MockHttpServletRequest request3 = new MockHttpServletRequest();
+//            MockHttpServletResponse response3 = new 
MockHttpServletResponse();
+//            request3.setSession(new MockHttpSession());
+//            handler.requestStart(request3, response3);
+//
+//            ObjectContext c3 = BaseContext.getThreadObjectContext();
+//            assertNotNull(c3);
+//            assertNotSame(c1, c3);
+//
+//            handler.requestEnd(request3, response3);
+//            try {
+//                BaseContext.getThreadObjectContext();
+//                fail("thread context not null");
+//            }
+//            catch (IllegalStateException e) {
+//                // expected
+//            }
+//        }
+//        finally {
+//            BaseContext.bindThreadObjectContext(null);
+//        }
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/WebConfigurationTest.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/WebConfigurationTest.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/WebConfigurationTest.java
new file mode 100644
index 0000000..f5410ed
--- /dev/null
+++ b/cayenne-web/src/test/java/org/apache/cayenne/web/WebConfigurationTest.java
@@ -0,0 +1,214 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import com.mockrunner.mock.web.MockFilterConfig;
+import com.mockrunner.mock.web.MockServletConfig;
+import org.apache.cayenne.di.Module;
+import org.junit.Test;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
+public class WebConfigurationTest {
+
+    @Test
+    public void testFilterCreateModules_Standard() throws Exception {
+
+        MockFilterConfig config = new MockFilterConfig();
+        WebConfiguration configuration = new WebConfiguration(config);
+
+        Module m1 = binder -> {
+        };
+
+        Module m2 = binder -> {
+        };
+
+        Collection<Module> modules = configuration.createModules(m1, m2);
+        assertEquals(2, modules.size());
+
+        Iterator<Module> it = modules.iterator();
+        assertSame(m1, it.next());
+        assertSame(m2, it.next());
+    }
+
+    @Test
+    public void testFilterCreateModules_Extra() throws Exception {
+
+        MockFilterConfig config = new MockFilterConfig();
+        String exra = String.format(
+                "%s, \n%s",
+                MockModule1.class.getName(),
+                MockModule2.class.getName());
+        config.setInitParameter(WebConfiguration.EXTRA_MODULES_PARAMETER, 
exra);
+
+        WebConfiguration configuration = new WebConfiguration(config);
+
+        Module m1 = binder -> {
+        };
+
+        Module m2 = binder -> {
+        };
+
+        Collection<Module> modules = configuration.createModules(m1, m2);
+        assertEquals(4, modules.size());
+
+        Iterator<Module> it = modules.iterator();
+        assertSame(m1, it.next());
+        assertSame(m2, it.next());
+        assertTrue(it.next() instanceof MockModule1);
+        assertTrue(it.next() instanceof MockModule2);
+    }
+
+    @Test
+    public void testServletCreateModules_Extra() throws Exception {
+
+        MockServletConfig config = new MockServletConfig();
+        String exra = String.format(
+                "%s, \n%s",
+                MockModule1.class.getName(),
+                MockModule2.class.getName());
+        config.setInitParameter(WebConfiguration.EXTRA_MODULES_PARAMETER, 
exra);
+
+        WebConfiguration configuration = new WebConfiguration(config);
+
+        Module m1 = binder -> {
+        };
+
+        Module m2 = binder -> {
+        };
+
+        Collection<Module> modules = configuration.createModules(m1, m2);
+        assertEquals(4, modules.size());
+
+        Iterator<Module> it = modules.iterator();
+        assertSame(m1, it.next());
+        assertSame(m2, it.next());
+        assertTrue(it.next() instanceof MockModule1);
+        assertTrue(it.next() instanceof MockModule2);
+    }
+
+    @Test
+    public void testFilterConfigurationLocation_Name() {
+        MockFilterConfig config1 = new MockFilterConfig();
+        config1.setFilterName("cayenne-x");
+
+        WebConfiguration configuration1 = new WebConfiguration(config1);
+        assertEquals("cayenne-x.xml", 
configuration1.getConfigurationLocation());
+
+        MockFilterConfig config2 = new MockFilterConfig();
+        config2.setFilterName("cayenne-y.xml");
+
+        WebConfiguration configuration2 = new WebConfiguration(config2);
+        assertEquals("cayenne-y.xml", 
configuration2.getConfigurationLocation());
+
+        MockFilterConfig config3 = new MockFilterConfig();
+        config3.setFilterName("a/b/c/cayenne-z.xml");
+
+        WebConfiguration configuration3 = new WebConfiguration(config3);
+        assertEquals("a/b/c/cayenne-z.xml", 
configuration3.getConfigurationLocation());
+    }
+
+    @Test
+    public void testServletConfigurationLocation_Name() {
+        MockServletConfig config1 = new MockServletConfig();
+        config1.setServletName("cayenne-x");
+
+        WebConfiguration configuration1 = new WebConfiguration(config1);
+        assertEquals("cayenne-x.xml", 
configuration1.getConfigurationLocation());
+
+        MockServletConfig config2 = new MockServletConfig();
+        config2.setServletName("cayenne-y.xml");
+
+        WebConfiguration configuration2 = new WebConfiguration(config2);
+        assertEquals("cayenne-y.xml", 
configuration2.getConfigurationLocation());
+
+        MockServletConfig config3 = new MockServletConfig();
+        config3.setServletName("a/b/c/cayenne-z.xml");
+
+        WebConfiguration configuration3 = new WebConfiguration(config3);
+        assertEquals("a/b/c/cayenne-z.xml", 
configuration3.getConfigurationLocation());
+    }
+
+    @Test
+    public void testFilterConfigurationLocation_Parameter() {
+        MockFilterConfig config1 = new MockFilterConfig();
+        config1.setFilterName("cayenne-x");
+        config1.setInitParameter(
+                WebConfiguration.CONFIGURATION_LOCATION_PARAMETER,
+                "cayenne-y.xml");
+
+        WebConfiguration configuration1 = new WebConfiguration(config1);
+        assertEquals("cayenne-y.xml", 
configuration1.getConfigurationLocation());
+    }
+
+    @Test
+    public void testServletConfigurationLocation_Parameter() {
+        MockServletConfig config1 = new MockServletConfig();
+        config1.setServletName("cayenne-x");
+        config1.setInitParameter(
+                WebConfiguration.CONFIGURATION_LOCATION_PARAMETER,
+                "cayenne-y.xml");
+
+        WebConfiguration configuration1 = new WebConfiguration(config1);
+        assertEquals("cayenne-y.xml", 
configuration1.getConfigurationLocation());
+    }
+
+    @Test
+    public void testFilterParameters() {
+        MockFilterConfig config1 = new MockFilterConfig();
+        config1.setFilterName("cayenne-x");
+        config1.setInitParameter(
+                WebConfiguration.CONFIGURATION_LOCATION_PARAMETER,
+                "cayenne-y.xml");
+        config1.setInitParameter("test", "xxx");
+
+        WebConfiguration configuration1 = new WebConfiguration(config1);
+        Map<String, String> parameters = configuration1.getParameters();
+        assertNotSame(parameters, configuration1.getParameters());
+        assertEquals(parameters, configuration1.getParameters());
+
+        assertEquals(2, parameters.size());
+        assertEquals("cayenne-y.xml", parameters
+                .get(WebConfiguration.CONFIGURATION_LOCATION_PARAMETER));
+        assertEquals("xxx", parameters.get("test"));
+    }
+
+    @Test
+    public void testFilterOtherParameters() {
+        MockFilterConfig config1 = new MockFilterConfig();
+        config1.setFilterName("cayenne-x");
+        config1.setInitParameter(
+                WebConfiguration.CONFIGURATION_LOCATION_PARAMETER,
+                "cayenne-y.xml");
+        config1.setInitParameter(WebConfiguration.EXTRA_MODULES_PARAMETER, 
"M1,M2");
+        config1.setInitParameter("test", "xxx");
+
+        WebConfiguration configuration1 = new WebConfiguration(config1);
+        Map<String, String> parameters = configuration1.getOtherParameters();
+        assertNotSame(parameters, configuration1.getOtherParameters());
+        assertEquals(parameters, configuration1.getOtherParameters());
+
+        assertEquals(1, parameters.size());
+        assertEquals("xxx", parameters.get("test"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleProviderTest.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleProviderTest.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleProviderTest.java
new file mode 100644
index 0000000..3a30b80
--- /dev/null
+++ 
b/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleProviderTest.java
@@ -0,0 +1,30 @@
+/*
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ */
+package org.apache.cayenne.web;
+
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.unit.util.ModuleProviderChecker;
+import org.junit.Test;
+
+public class WebModuleProviderTest {
+    @Test
+    public void testProviderPresent() {
+        
ModuleProviderChecker.testProviderPresent(WebServerModuleProvider.class, 
CayenneServerModuleProvider.class);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleTest.java
----------------------------------------------------------------------
diff --git 
a/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleTest.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleTest.java
new file mode 100644
index 0000000..afb4ae5
--- /dev/null
+++ b/cayenne-web/src/test/java/org/apache/cayenne/web/WebModuleTest.java
@@ -0,0 +1,40 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import org.apache.cayenne.di.Injector;
+import org.apache.cayenne.di.spi.DefaultInjector;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
+public class WebModuleTest {
+
+    @Test
+    public void testBind_Scopes() {
+
+        Injector injector = new DefaultInjector(new WebModule());
+        RequestHandler handler = injector.getInstance(RequestHandler.class);
+        assertTrue(handler instanceof SessionContextRequestHandler);
+
+        RequestHandler handler1 = injector.getInstance(RequestHandler.class);
+        assertNotSame("Incorrect singleton scope for request handler", 
handler, handler1);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/24b45fd4/cayenne-web/src/test/java/org/apache/cayenne/web/WebUtilTest.java
----------------------------------------------------------------------
diff --git a/cayenne-web/src/test/java/org/apache/cayenne/web/WebUtilTest.java 
b/cayenne-web/src/test/java/org/apache/cayenne/web/WebUtilTest.java
new file mode 100644
index 0000000..723be27
--- /dev/null
+++ b/cayenne-web/src/test/java/org/apache/cayenne/web/WebUtilTest.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.web;
+
+import com.mockrunner.mock.web.MockServletContext;
+import org.apache.cayenne.configuration.CayenneRuntime;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.mockito.Mockito.mock;
+
+public class WebUtilTest {
+
+    @Test
+       public void testGetCayenneRuntime() {
+               MockServletContext context = new MockServletContext();
+
+               assertNull(WebUtil.getCayenneRuntime(context));
+
+               CayenneRuntime runtime = mock(CayenneRuntime.class);
+
+               WebUtil.setCayenneRuntime(context, runtime);
+               assertSame(runtime, WebUtil.getCayenneRuntime(context));
+
+               CayenneRuntime runtime1 = mock(CayenneRuntime.class);
+
+               WebUtil.setCayenneRuntime(context, runtime1);
+               assertSame(runtime1, WebUtil.getCayenneRuntime(context));
+
+               WebUtil.setCayenneRuntime(context, null);
+               assertNull(WebUtil.getCayenneRuntime(context));
+       }
+}

Reply via email to