Commit Graph

3087 Commits

Author SHA1 Message Date
Ray J. Greenwell bba7ee14be Preparing for 1.8-SNAPSHOT development. 2014-05-20 11:26:20 -07:00
Ray J. Greenwell 20a247e509 Preparing for samskivert-1.7.4 release. 2014-05-20 11:23:10 -07:00
Michael Bayne 93109a004f Yet more lastInsertedId revamping. Third time's the charm. 2014-05-02 13:45:10 -07:00
Michael Bayne 4efae53621 Handle null uniqueColumns. 2014-05-02 13:13:11 -07:00
Michael Bayne d870dd2fac Merge branch 'master' of https://github.com/threerings/samskivert 2014-05-02 13:10:32 -07:00
Michael Bayne 5356672130 Make lastInsertedId return null on failure.
Since we're rejiggering, we'll take this opportunity to eliminate the use of -1
as a sentinel id. Maybe your database id generator returns -1. Unlikely, but
not impossible.
2014-05-02 13:07:05 -07:00
Ray J. Greenwell a641e6c502 Fix. 2014-05-02 11:50:41 -07:00
Michael Bayne a473ff2ef1 Make use of getGeneratedKeys in lastInsertedId.
This allows us to do the necessary hackery for MySQL which reports the
generated key as GENERATED_KEY instead of via its actual column name.
2014-05-02 11:15:11 -07:00
Ray J. Greenwell 2e0f9b29e6 Preparing for 1.8-SNAPSHOT development. 2014-04-29 15:01:47 -07:00
Ray J. Greenwell 1f4dc9abf7 Preparing for samskivert-1.7.3 release. 2014-04-29 14:57:55 -07:00
Ray J. Greenwell 66e0874633 Added Weigher interface, and a pick(Iterable, Weigher).
I wanted something like this before, but with guava's Function,
and samskivert doesn't depend have dependencies.
But with Java 8 coming, functional interfaces make the distinction
between different interfaces less important.
2014-04-23 10:08:18 -07:00
Ray J. Greenwell 2f4bdb961b Fixed a longstanding issue with long thresholds.
There was no way to set the "long threshold" per-Invoker.
A Unit could override getLongThreshold(), or you could set a static
jvm-wide long threshold for all Invokers.

That doesn't make sense. Set the long threshold you need on each invoker.

All existing behavior is preserved for the time being, but I've deprecated
the static method.

Units return 0 now to indicate that they don't have their own setting.
I'm pretty sure nobody out there is doing anything kooky like
"return 500 + super.getLongThreshold();" at least in the code I've scanned.
2014-04-23 09:50:16 -07:00
Ray J. Greenwell df44ea16f1 Use the NOOP class to implement the NOOP constant.
Really, they should both be deprecated. Log your exceptions.
If there's a special place where you have to hack it to not log
an exception, that special place can damn well create its own no-op
listener. Or be fixed!

Having an abstract class that only implements a blank requestCompleted()
would make sense, as would a sharable singleton instance that does
nothing on success and always logs on failure. Hmm.
2014-04-23 09:42:22 -07:00
Ray J. Greenwell 5fee13709f Preparing for 1.8-SNAPSHOT development. 2014-02-25 17:40:20 -08:00
Ray J. Greenwell 71db2d4eb7 Preparing for samskivert-1.7.2 release. 2014-02-25 17:33:53 -08:00
Michael Bayne d570f60ac3 Unused import. 2014-01-20 14:26:55 -08:00
Michael Bayne 6bc9ba32db Formatting, no @Override iface for 1.5, etc. 2014-01-20 14:23:34 -08:00
Michael Bayne 278112f4b6 Nix unused import. 2014-01-20 14:18:26 -08:00
Ray J. Greenwell 241fd0824d Protect from stupid null usage by javax.mail.
If you add no addresses to a message, getting the recipient array
returns null rather than an empty array. So fucking dumb.
2014-01-14 11:30:08 -08:00
Ray J. Greenwell 82a55291bc Commenting, cleanup, close our Transport.
This works, I'm shipping it and hopefully I'll get some answers.
2014-01-14 10:45:43 -08:00
Ray J. Greenwell 851999aa78 Try using a TransportListener to listen for delivery errors.
This is somewhat temporary code to try something out...
In our production environment there are mails getting lost.
I'd like to find out why.
Try using a TransportListener. This is more complicated.
Also the listener may be getting added many times. We shall see.
2014-01-13 14:44:50 -08:00
Michael Bayne 92b6e743ab Accept null uConCols and pKeyCols as advertised. 2013-10-08 11:57:12 -07:00
Ray J. Greenwell 35beb02b95 Use Arrays.fill(). 2013-10-01 16:08:08 -07:00
Michael Bayne 74ab7c6319 Some tidying. 2013-05-28 17:10:45 -07:00
Michael Bayne e3ea2ce0a5 Merge branch 'master' of https://github.com/KolonelKustard/samskivert 2013-05-28 17:07:17 -07:00
Michael Bayne d173ca5ecd Provide per-package loggers.
I also made them package private where possible. It's too easy for code that
depends on samskivert to accidentally import com.samskivert.Log rather than
define its own logger.

Unfortunately Java doesn't have "this package and subpackages" protection, so
some of the package loggers have to be public to allow sub-packages to access
them. I didn't really want to have to define loggers for half a dozen
subpackages as well.
2013-05-24 11:25:51 -07:00
Michael Bayne 3442a51457 Added a Log for JDBC code; info -> debug for HSQL liaison. 2013-05-24 10:43:37 -07:00
Michael Bayne 58736e2e8b A bunch of Eclipse appeasement. 2013-05-24 08:08:52 -07:00
Michael Bayne e43d84211e Add nexus-staging-maven-plugin; makes releases easier. 2013-05-08 16:32:13 -07:00
Michael Bayne efe4d98135 [maven-release-plugin] prepare for next development iteration 2013-05-07 12:50:51 -07:00
Michael Bayne 9810907f1c [maven-release-plugin] prepare release samskivert-1.7.1 2013-05-07 12:50:40 -07:00
Michael Bayne 6268823186 Allow shenanigans (injection) when instantiating logic. 2013-05-07 07:26:39 -07:00
Michael Bayne 1a7ed933e7 Added forTest(). 2013-05-06 17:40:18 -07:00
Michael Bayne aca5806cd4 Allow for more app/dispatcher customizations. 2013-05-06 16:13:21 -07:00
Ray J. Greenwell 557ac47d60 No need to create an ArrayList. 2013-05-06 13:28:15 -07:00
Michael Bayne 2bf7fb3868 Allow a dispatcher servlet to just create its app.
Going through the servlet config is kind of pointless when there's almost
always a one to one connection between a DispatcherServlet and an Application.
2013-05-06 13:21:48 -07:00
Michael Bayne 797ae92e4c IndiscriminateSiteIdentifier -> SiteIdentifiers.DEFAULT
Also added SiteIdentifiers.single().
2013-05-06 13:21:14 -07:00
Michael Bayne 471a6ce1d5 Add a version of createTableIfMissing minus uinqueness constraints.
Most callers don't want or need 'em and have to import List and Collections
just to conveniently pass in an empty list.
2013-05-06 11:17:23 -07:00
Michael Bayne bd7e747eeb Out with arrays, in with collections. 2013-05-06 11:07:21 -07:00
Michael Bayne 678c990270 Fix issue with primary keys, uniqueness and HSQLDB 2.2.4.
Said version of HSQLDB freaks out if primary keys are included in the UNIQUE
clause when creating a table. They're unique by definition, and the HSQLDB
authors are clearly strong believers in DRY. So much so that RY is considered
an error in this case.
2013-05-06 10:34:26 -07:00
Michael Bayne d5cbc48a6f Fail earlier if we get a null URL. 2013-05-06 09:45:46 -07:00
kolonel 819a70161b Added support for protocol version 6 (and UTF-8), added support for DYEAR and DGENRE to #read() and added a method for calling "cddb lscat" to return the list of categories on the server. 2013-04-28 22:04:25 +01:00
Michael Bayne 3992d7c724 [maven-release-plugin] prepare for next development iteration 2012-10-02 11:45:24 -07:00
Michael Bayne 5c0ce7d6e1 [maven-release-plugin] prepare release samskivert-1.7 2012-10-02 11:45:15 -07:00
Mark Johnson cab5d01e89 Preparing for 1.7-SNAPSHOT development. 2012-09-05 13:33:57 -07:00
Mark Johnson 4b05ba5cee Preparing for samskivert-1.6.1 release. 2012-09-05 13:25:21 -07:00
Ray J. Greenwell 54382927dc Don't hardcode a Content-Type in the newly-added overload. 2012-08-17 13:51:25 -07:00
Ray J. Greenwell de7f31b0f4 Allow a map of request properties to be specified.
This adds an overload. A better way might be to configure some sort of builder
and finish with request(), but that's a larger refactor and if I was doing
that there'd be plenty to fix.
2012-08-16 19:06:00 -07:00
Pär Winzell 9decf8bfbb IDEA can trivially load this module from its POM. 2012-07-23 12:32:39 -05:00
Ray J. Greenwell 34ddf5b472 Deprecated constructor with pointless argument. 2012-04-30 14:19:15 -07:00