Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d6y/shutdown-test
shutdown test
https://github.com/d6y/shutdown-test
Last synced: about 1 month ago
JSON representation
shutdown test
- Host: GitHub
- URL: https://github.com/d6y/shutdown-test
- Owner: d6y
- Created: 2011-03-07T21:54:22.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-03-08T09:02:22.000Z (almost 14 years ago)
- Last Synced: 2023-03-10T19:08:48.821Z (almost 2 years ago)
- Language: Scala
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Behaviour
---------When using a JNDI data source and Jetty, shutting down Jetty causes Lift to throw an exception if there are active comet actors.
2011-03-07 21:41:51,510 WARN - Failure in remove session
java.lang.NullPointerException: Looking for Connection Identifier ConnectionIdentifier(jdbc/exampleDb) but failed to find either a JNDI data source with the name jdbc/exampleDb or a lift connection manager with the correct name
at net.liftweb.db.DB$$anonfun$7$$anonfun$apply$11.apply(DB.scala:154)
at net.liftweb.db.DB$$anonfun$7$$anonfun$apply$11.apply(DB.scala:154)
at net.liftweb.common.EmptyBox.openOr(Box.scala:561)Observed in a production Jetty+MYSQL environment, and reproduced here using a Derby and SBT.
This doesn't appear to have any decremental effect on the application.
Expected behaviour
------------------When shutting down Jetty (via the Jetty stop script or SBT jetty-stop) we expect no error to be generated.
Steps to reproduce
------------------This git project is a SBT 0.7.5.RC0 projects created with Lifty for LIFT 2.3-SNAPSHOT running under Scala 2.8.1
$ git clone git://github.com/d6y/shutdown-test.git
$ cd shutdown-test
$ sbt
> update
> jetty-runEnsure that the output from jetty-run includes "JNDI connection found".
Then visit http://127.0.0.1:8080/ (this is important as active comet actors are needed to trigger the issue)
Finally, run...
> jetty-stop
See the stack trace?
Observations
------------* Commenting out the comet actor in index.html prevents the stack trace being produced during shutdown.
* Using non-JNDI data sources prevents the stack trace.
* Note that the app does not access the data source (no schemify, no mapper access)
* Tested with MySQL, and MySQL with C3P0 polling - produces the stack trace.
* Grep the project for "JNDI" for places I have touched the default Lifty app.
* Did not see this with Tomcat 6 with a similar configuration.