Wednesday, May 16, 2012

Azzyzt JEE Tools 1.3.2 are available

Fixed a bug where under certain conditions string IDs would break storeMulti(). The cause was, that the check for the possibility of proxy ID translation of an ID field was done on the field’s owning entity instead of the field’s target entity. It broke as soon as an entity with numeric ID had an association to an entity with a string ID. String IDs inside of embedded IDs (like VisitId) were no problem, because embedded IDs are special-cased anyway. This closes issue #29.

Friday, March 2, 2012

Azzyzt JEE Tools 1.3.1 are available

This is a release with neither functional changes nor bug fixes. I just wanted to bring Azzyzt JEE Tools to the current versions of GlassFish and Eclipse.

Built and tested with Eclipse Indigo SR2, GlassFish 3.1.2 and Java 1.6.0_31

Tuesday, January 10, 2012

Azzyzt JEE Tools 1.3.0 are available

After quite a long time I have a new version 1.3.0 available on GitHub. Install it from the update site as usual. The changes are

  • New URLs for SOAP and REST. The new URL schema bundles full services and restricted services. Thus it is possible to allow/disallow one of those categories based on the URL prefix. This breaks current applications and therefore we have bumped the minor version.
  • The default HTTP header expected to contain a pre-authenticated username is now “x-authenticate-userid”.
  • The default HTTP header expected to contain a user’s credentials is now “x-authorize-roles”. See the tutorial for details on credentials.
  • These two HTTP header names and the default anonymous user name can still be changed via JNDI custom string resources, but this is more elaborate now. The old JNDI resource for the username HTTP header was “custom/stringvalues/http/header/username”, but as this is global and would define the header name for all applications, we have recognized that a per-app definition may be useful. From 1.3.0 on the first resource checked is “custom/stringvalues/app_<APPNAME>/http/header/username”, where “<APPNAME>” is the project base name, in the example application it’s “cookbook”. If this name is not defined, the global name “custom/stringvalues/http/header/username” is tried, and if that isn’t defined either, the default value is used.
  • Added lots of JavaDoc to runtime. Still not complete though.
  • Added an AuthorizationInterface. You can add a reference to an instance of a class implementing this interface to the Azzyztant. It’s completely analogous to the username converter and it can be used to check authorization per call, based on the taget class/method and credentials.
  • Eliminated the MAGWIEN feature. Through all the time it has been identical to the GENERIC feature anyway. So far we don’t need any special or secret code and the configuration options suffice.
  • Added a subset of BETWEEN to QuerySpec. You can specify BETWEEN clauses where the result is limited to be between two literals. This covers the most common uses. The general solution, where each limit can be either a literal or a field reference, would have needed a major refactoring or polluted the code to no end.
  • Tested with GlassFish 3.1.1
  • Tested with Indigo SR1
  • Added credential-based authorization
  • Added unit tests for credential-based authorization
Sorry for breaking the URL schema. It's much better now and from lack of feedback I doubt that too many external users (any?) will be affected at the moment.

In any case: enough has changed to warrant going to the tutorial again.

Thursday, July 7, 2011

Azzyzt JEE Tools 1.2.4 are available

Some more customization: 

  • Now you can not only cut back on features that would normally be generated, you can also add features that would normally not be generated. Currently the only option to add is an Apache CXF REST client project. Interfaces for the CXF proxy-based API are generated. The tutorial now contains an example for in-server unit tests implemented via CXF REST. 
  • Customization of the REST error response via HTTP request headers.
See section 6 Customization of the generated code for all the details.

Sunday, June 26, 2011

Azzyzt JEE Tools 1.2.3 are available

Everybody makes an Indigo release these days, why shouldn't I :-?

The only visible changes are in the vanity department: The installed feature is now displayed in the list of installed features (this was a harmless bug) and in Eclipse's "Help / About" dialog there's now an Azzyzt icon.

Azzyzt JEE Tools are now built on Indigo and against a GlassFish 3.1 runtime. Up to now I have used Helios SR1 and GlassFish 3.01 for building.

I have tested the cookbook tutorial in the following configurations:
  • Glassfish Tools Bundle for Eclipse (Galileo SR1 + GlassFish 3.0)
  • Helios SR1 + GlassFish 3.01
  • Helios SR2 + GlassFish 3.1
  • Indigo + GlassFish 3.1
I guess I should try to automate these tests :)

Monday, June 20, 2011

Azzyzt JEE Tools 1.2.2 are available

Well, actually they've been available since Friday afternoon, but you just don't announce new software on Fridays. So, what's new?

  • Support for JSON added. Query spec parameter for list operations is intentionally still XML though. The operations in the generated ModifyMulti bean could theoretically be accessed via JSON, but in practice this fails due to lacking deserialization support for polymorphic lists. In XML this is solved via @XmlSeeAlso annotations on parent classes, Jackson, the JSON base technology in GlassFish, has evolved something analogous in 1.5 and as GlassFish 3.1 ships with 1.5.5, it would be possible to support it. The necessary annotations are in the package org.codehaus.jackson.annotate, and I expect them to surface somewhere under in JEE 7. If you really need it now, you can always change the code or the generator :)
  • Two new cutbacks can be defined in Azzyztant: NoRestServicesXml and NoRestServicesJson. If both are used, no REST code is generated at all, not even the servlet.
  • A good one and a bad one: we now clean all generated folders before generating code. This has become a necessity with cutbacks. The drawback is, that we now have Apache Commons IO as an additional bundled library.

Thursday, June 9, 2011

Documentation updated

Originally I had got the semantics of the "Visit" class in the tutorial stupidly wrong. The language used by the guide is no extra attribute, it clearly has to be a part of the embedded ID.

How do I know? Well, in the original you couldn't insert two visits from the same ZIP area to the same city, but with different languages used by the guide. You always got an update of the same record, because the ID, combining only city and ZIP, was the same.

Now we have an association between three entities, City, Zip and Language, all three contributing their respective IDs to the embedded ID, and the "numberOfVisitors" has become a "totalNumberOfVisitors". Whenever new data about a visit comes in, we look if an instance of Visit already exists. If so, we increment its total number of visitors, otherwise we create a new object. Maybe I should even call the class not Visit but VisitStats or something like that.

I have not made a new release, but I have already updated the documentation, the tutorial as well as, the archive that also contains sample sources. You would have got it with the next release, but I figure it is bad style keeping nonsense on the web as soon as you recognize it's nonsense :)