Insubstantial 6.2

Nach dem Kirill Grouchnikov in sein Substantial keine Zeit mehr investiert, gibt es vom Nachfolgeprojekt ein erstes ernsthaftes Update: http://shemnon.com/speling/2011/04/insubstantial-62-release.html. Unter anderen gehört Maven dazu, Änderungen laut Webseite:

  • Gradle – the codebase has been adjusted to use Gradle as the build system. This has allowed for seampless deployment into the maven repositories. For Trident, laf-plugin, and substance-swingx this represents the entirity of the changes
  • Maven Distribution – this deserves it’s own bullet point. The jars are available from day one in the maven repositories.
  • NPE Bugs – most of the code changes are to deal with possible null pointer exceptions. No one in their right mind would use a JTable as a table cell renderer, but it does happen in the wild.
  • Flamingo API addition – a patch from Jonathan Gileswas applied to allow commands to be removed from the ribbon.
  • Java 7 fixes – there is a bug fix in Java’s Color Choosers that broke substance 6.1. This is fixed in Substance 6.2, so it should run on Java 7 now!

Guice 3.0 ist raus

Nach laaaanger Wartezeit ist DI-Framework Guice 3.0 veröffentlicht worden. Von http://code.google.com/p/google-guice/wiki/Guice30 die Neuerungen:

  • JSR 330 support
  • New Persist extension
  • ToConstructor Bindings
  • Better OSGi support (and generally improved support for multiple classloaders)
  • New methods in Binder: requireExplicitBindings & disableCircularProxies
  • Much simpler stack traces when AOP is involved
  • Exact duplicate bindings are ignored (instead of an exception being thrown)
  • Repackaged cglib, asm & guava classes are now hidden from IDE auto-imports
  • Source can be built with Maven
  • General extension & SPI improvements:
  • Scope improvements:
    • Scopes.isSingleton
    • toInstance bindings are considered eager singletons in the Scope SPI
    • Singleton providers that return null are now scoped properly.
    • Fail when circularly dependent singletons cannot be proxied (previously two instances may have been created)
  • Provider Method (@Provides) improvements:
    • Logger dependencies now use named instead of anonymous loggers
    • Exceptions produce a simpler stack
  • Private Modules improvements:
    • If a single PrivateModule is passed to Modules.override, private elements can be overridden.
    • If many modules are passed to Modules.override, exposed keys can be overridden.
  • Multibinder & MapBinder extension improvements:
    • permitDuplicates — allows MapBinder to inject a Map<K, Set<V>> and a Map<K, Set<Provider<V>> and Multibinder to silently ignore duplicate entries
    • Expose dependencies in Stage.TOOL, and return a dependency on Injector (instead of null) when working with Elements.
    • Co-exist nicely with Modules.override
    • Work properly with marker (parameterless) annotations
    • Expose details through the new extensions SPI
  • Servlet extension improvements:
    • Added with(instance) for servlet bindings.
    • Support multiple injectors using ServletModule in the same JVM.
    • Support thread-continuations (allow background threads to process an HttpRequest)
    • Support manually seeding a @RequestScope
    • Expose details through new extensions SPI
    • Fix request forwarding
    • Performance improvements for the filter & servlet pipelines
    • Expose the servlet context (ServletModule.getServletContext)
    • Fixed so a single ServletModule instance can be used twice (in, say Element.getElements & creating an Injector)
    • Fix to work with context paths
  • AssistedInject extension improvements
    • New FactoryModuleBuilder for building assisted factories
    • Injection is done through child injectors and can participate in AOP
    • Performance improvements
    • Multiple different implementations can be created from a single factory
    • Incorrect implementations or factories are detected in Stage.TOOL, and more error-checking with better error messages
    • Work better with parameterized types
    • Expose details through new extensions SPI
  • ThrowingProviders extension improvements
    • Added a new CheckedProviders interface that allows more than one exception to be thrown.
    • Added @CheckedProvides allowing @Provides-like syntax for CheckedProviders.
    • Dependencies are checked at Injector-creation time and during Stage.TOOL, so they can fail early
    • Bindings created by ThrowingProviderBinder now return proper dependencies instead of Injector.
  • Struts2
    • The Struts2 extension now works again! (It worked in Guice 1.0 and was somewhat broken in Guice 2.0)
  • Added to Injector: getAllBindings, getExistingBinding, getScopeBindings, getTypeConverterBindings.
  • Added to Key: hasAttributes, ofType, withoutAttributes
  • Various bug fixes / improvements:
    • Prevent child injectors from rebinding a parent just-in-time binding.
    • Non-intercepted methods in a class with other intercepted methods no longer go through cglib (reducing total stack frames).
    • Allow Guice to work on generated classes.
    • Fix calling Provider.get() of an unrelated Provider in a scoping method.
    • MoreTypes.getRawTypes returns the proper types for arrays (instead of Object.class)
    • JIT bindings left in a parent injector when child injectors fail creating a JIT binding are now removed
    • Overriding an @Inject method (if the subclass also annotates the method with @Inject) no longer injects the method twice
    • You can now bind byte constants (using ConstantBindingBuilder.to(byte))
    • Better exceptions when trying to intercept final classes, using keys already bound in child or private module, and many other cases.
    • ConvertedConstantBinding now exposes the TypeConverterBinding used to convert the constant.

JBoss jBPM in der Version 5

Die Hauptseite http://www.jboss.org/jbpm zählt als Neuerungen auf:

jBPM5 is the latest community version of the jBPM project.  It is based on the BPMN 2.0 specification and supports the entire life cycle of the business process (from authoring through execution to monitoring and management).

The current jBPM5 snapshot offers open-source business process execution and management, including

  • embeddable, lightweight Java process engine, supporting native BPMN 2.0 execution
  • BPMN 2.0 process modeling in Eclipse (developers) and the web (business users)
  • process collaboration, monitoring and management through the Guvnor repository and the web console
  • human interaction using an independent WS-HT task service
  • tight, powerful integration with business rules and event processing

Contracts für Java

Ein neues Projekt eines Google-Mitarbeiter verspricht Zusicherungen zur Laufzeit zu prüfen. Ankündigung: http://google-opensource.blogspot.com/2011/02/contracts-for-java.html, Projekt unter http://code.google.com/p/cofoja/. Mal sehen wie sich das entwickelt, im .NET Umfeld ist da einiges im Gange. In Java 7 waren mal einige Annotationen geplant, die sind aber gestorben. @NotNull und so weiter hat sich als sehr nützlich erwiesen, das funktioniert in der Praxis.

Google App Engine 1.4

Wie im Blog http://googleappengine.blogspot.com/2010/12/happy-holidays-from-app-engine-team-140.html zu lesen, erblickt die Version 1.4 das Adventlicht. Die News in Kürze:

  • The Channel API – A bi-directional channel for communicating directly with user browsers by pushing notifications directly to the JavaScript running on the client, eliminating the need for polling. This service makes it easy to build real-time applications such as multi-player games, chat rooms, or any collaboration centric app and is built on the same Google infrastructure that powers Google Talk.
  • Always On – For high-priority applications with low or variable traffic, you can now reserve instances via App Engine’s Always On feature. Always On is a premium feature costing $9 per month which reserves three instances of your application, never turning them off, even if the application has no traffic. This mitigates the impact of loading requests on applications that have small or variable amounts of traffic.

Screenshot of the Instances page in the App Engine Admin Console with Always On enabled.

  • Warm Up Requests – This feature reduces time to serve requests by anticipating the need for more instances and loading them before user traffic is sent to the new instance. It can be enabled for all applications through app.yaml or appengine-web.xml and is enabled by default for applications that have purchased Always On. Once enabled, warm up requests will be sent whenever possible to load new instances of your application before it begins serving user traffic.

Der erste Teil ist oft unter dem Stichwort Comet geführt.

Weitere Änderungen:

  • No more 30-second limit for background work – With this release, we’ve significantly raised this limit for offline requests from Task Queue and Cron: you can now run for up to 10 minutes without interruption.
  • Increased API Call Size Limits – A new API architecture has allowed us to start lifting the 1MB size limits on many of the App Engine APIs. To start, the following APIs have been changed:
    • Response size limits for URLFetch have been raised from 1MB to 32MB.
    • Memcache batch get/put can now also do up to 32MB requests.
    • Image API requests and response size limits have been raised from 1MB to 32MB.
    • Mail API outgoing attachments have been increased from 1MB to 10MB

10 Minuten würden mir schon helfen, Daten in die BigTabe zu laden…

Tomcat 7.0.5 mit einem neuen interessanten Feature

Implement support for parallel deployment. This allows multiple versions of the same web application to be deployed to the same context path at the same time. Users without a current session will be mapped to the latest version of the web application. Users with a current session will continue to use the version of the web application with which the session is associated until the session expires. (markt)

Mehr Änderungen unter http://tomcat.apache.org/tomcat-7.0-doc/changelog.html.

Release von Velocity Engine Version 1.7

Nach der Version 1.6.4 im May gibt es nach einem halben Jahr ein Update auf die nächste Versionsstufe Velocity 1.7. Die Updates http://velocity.apache.org/news.html:

Since 1.6, there has been a lot of work: #@body()content#end, #[[literal content]]#, major namespacing changes, $newListSyntax[$i], and more. Please see the change log for details!

Since 1.7-beta1, we fixed, VELOCITY-785, VELOCITY-766, VELOCITY-760, and VELOCITY-753. We also added access to current template and directive debugging info through $foo.info (where foo is the namespace you are seeking info about).

For more details on these, again, see the change log.

Downloads of 1.7 are available here. This is a drop-in replacement for Velocity 1.6, however, it also begins the transition to 2.0 features. Users upgrading should expect deprecation warnings in their logs.

Was benutzt ihr für eine Template Engine? Velocity oder Freemaker oder andere (exotische) wie http://www.stringtemplate.org/?

Eclipse TPTP wird eingestellt

Sehr schade, denn TPTP fand ich als freie Profiling-Umgebung ganz cool (wenn auch nicht besonders performant). Die Testumgebung habe ich nie benutzt…

http://www.eclipse.org/tptp/home/project_info/devplans/EclipseTPTPProjectPlan2010.htm schreibt:

The Eclipse Test and Performance Tools Platform (TPTP) Project provides an open platform supplying powerful frameworks and services that allow software developers to build unique test and performance tools, both open source and commercial, that can be easily integrated with the platform and with other tools.

After many successful releases of TPTP, the project has evolved and matured. However, participation in the project has dwindled over time. TPTP has been in maintenance mode since TPTP 4.5.0 and at this point of the project cycle, the PMC has decided that TPTP 4.7 will be the last major release of TPTP (part of the Eclipse Helio release). We will be participating in the upcoming Helios services releases (TPTP 4.7.1 for Helios SR1 and TPTP 4.7.2 for Helios SR2) but will not be part of the next major Eclipse release (Eclipse 3.7, a.k.a. Indigo).

Once TPTP 4.7.2 is released in February 2011, we plan to follow the Eclipse archiving process to archive the remaining TPTP projects, which means that the mailing lists, newsgroups, website, and completed CVS/SVN repository will be stored in an archive (a zip or tar.gz) on the eclipse.org servers. The projects to be archived include:

· Platform

· Testing Tools

· Trace & Profiling Tools

· Monitoring Tools (archiving already approved by the EMO in May 2010)

Und warum also die Einstellung? Open Source funktioniert eben nur, wenn viele mitmachen.

Frage: Was benutzt ihr zum Profilen? Freie Tools (NetBeans, …) oder kommerzielle wie JProfiler, JProbe, … ?

Amino: Ein neues Gui-Framwork

Josh stellt in seinem Blog-Beitrag http://weblogs.java.net/blog/joshy/archive/2010/10/09/announcing-amino-new-ui-toolkit-desktop-java ein neues Gui-Framwork Amino (http://leonardosketch.org/amino/) vor.

Amino is a next generation graphics library and UI toolkit. Though originally built as support for Leonardo Sketch it is now it’s own incubator project.  Amino is a 100% open source Java library that provides:

  • a 2D/3D scenegraph with multiple backends (Java2D, JOGL, and more coming).
  • a set of UI controls, skinnable with CSS.
  • Utility classes to help you build desktop apps quickly.
  • is extremely testable.
  • 100% open source (BSD), redistributable, and embeddable.
  • 100% Java, ready for use by any JVM dynamic language (Groovy, JRuby, Jython, JavaScript, JavaFX Script, etc.)

Erweiterungen von Swing sind:

    • Uses an event bus instead of listeners on each component, enabling better separation of model and view
    • A background task API to handle threading for you.
    • Mixes a retained mode scenegraph with immediate mode paint APIs so you can work at the abstraction level you prefer.
    • There are no Look & Feel classes. All UI skinning is done directly with CSS 3, even the default L&F.
    • If you use the (experimental) JOGL backend you can directly mix 2D graphics with OpenGL code.
    • All controls can be referenced by ID, similar to JavaScript libs, enabling further separation of concerns.
    • Amino has a tool called AppBundler which generates Mac OSX .app bundles as well as JNLP builds. The user should never know that your app is written in Java, or any other language. They will just love your app.

Noch sehen die Gui-Componenten gammelig aus aber es kann was werden (ist ja alles “nur” CSS).

Update von SwingX auf Version 1.6.2

Jan Haderke, ein Commiter des SwingX Projekts, schreibt:

As it became almost a tradition we have rolled out next SwingX release just before the SwingLabs BOF at JavaOne last night.

You can get the release from our website, or directly from the java.net or also from the maven central repo. Please note that the artifactID has changedfrom swingx to swingx-core due to changes in the structure of the project.

Thanks a lot to all who contributed to this release with both the bug reports and the fixes.

Ein Kommentator lästert gleich, dass zwar Maven unterstützt wird, aber das POM falsch ist.

SwingX nutzt auch Hudson (http://swinglabs.java.sun.com/hudson/), schön. (Kohsuke Kawaguchi war bei einem Interview auf Oracle Dev zu sehen, sehr sympathisch der Typ. Schade, dass der von Sun/Oracle gegangen ist.) Hudson (http://hudson-labs.org/changelog) hat vor ein paar Tagen auch eine neues Release veröffentlicht.

Hinweis:

SimpleDS 1.0 ist fertig

Entwickler auf der GAE/J, die nicht mit JPA oder JDO arbeiten – was die Regel sein dürfte? – können die neuste Version von SimpleDS nutzen.

In der Vergangenheit habe ich ein GAE/J-Projekt mit http://code.google.com/p/objectify-appengine/ realisiert und mich gegen SimpleDS entschieden. Beides haben etwas unterschiedliche Philosophien, wie sie mit IDs/Keys umgehen. Frühere Blog-Eintrage verlinken zu beiden und zu Seiten mit einer Diskussion der Unterschiede.

Async Http Client 1.1.0 ist fertig

So kann man es lesen unter http://jfarcand.wordpress.com/2010/09/04/async-http-client-1-1-0-released/. Neu ist:

  • Connection pool is unlimited by default
  • Basic and Digest Authentication supported out-of-the-box
  • Multi Headers support
  • Removal of Google Collection and Log4j dependency (significantly reduce the jar)
  • Latest Netty version (3.3.2)
  • OAuth signature now supported
  • Proxy per request now supported
  • Performance improved
  • JDK Uri/Url now used instead of our own Url class.

Kirill Grouchnikov legt Substance, Flamingo, (Java) Trident auf Eis

Aus http://old.nabble.com/Continuing-development-of-substance,-flamingo-and-others-td29568644.html:

I am currently suspending support for Substance, Flamingo, Trident and related plugins / demo projects.  I do not have any plans to delete any downloadable binaries, change the licensing terms or delete the projects themselves, or to allow others to take ownership of the original projects.  Please respect the licensing terms.
Thanks, Kirill

Sehr schade.

Jetty 7.x und meine leichte Abneigung

Jetzt wo Jetty 7 zu Eclipse gewandert ist und auch immer modularer wird, schwindet meine Euphorie gegenüber dem Projekt. Das liegt an drei Gründen.

  1. Viele Jars. Um nur ein einfaches Servlet servieren zu können sind nötig: jetty-continuations (warum es hie eine Abhängigkeit gibt ist mir Schleierhaft), jetty-http, jetty-io, jetty-security, jetty-server, jetty-servlet, jetty-util. (Man kann das auch als ein großes Jar auch den Maven Rep. holen.)
  2. Umzug nach Eclipse. Durch den Umzug nach Eclipse befinden sich Dokus aus verschiedenen Servern. Es fehlt eine klare Anlaufstelle mit und vollständiger Doku.
  3. API-Änderungen. Nicht nur der Paketnamen ändert sich, sondern auch ein paar Methoden. Das ist an sich nichts problematisch, ab wenn eben mit Punkt 2 die Dokus nicht immer auf dem neusten Stand sind, nervt das.

Zusammenfassend für ein Servlet:

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.*;

public class StartJetty
{
  public static void main( String[] args ) throws Exception
  {
    Server server = new Server( 8080 );

    ServletContextHandler context = new ServletContextHandler( server, "/" );
    context.addServlet( new ServletHolder( new HiServlet() ), "/*" );
    server.start();
    server.join();
  }
}

class HiServlet extends HttpServlet
{
  protected void doGet( HttpServletRequest request, HttpServletResponse response )
      throws ServletException, IOException
  {
    response.setContentType( "text/html" );
    response.setStatus( HttpServletResponse.SC_OK );
    response.getWriter().println( "Hi" );
  }
}