This is a new aspect that provides a simple asynchronous notification mechanism.
Fixed generation of relations
Fixed concurrency problems that ocurred on images in the photos sample
When an object is removed from a collection, its views are removed.
Fixed windows related bugs.
Tutorial updates.
Transformed classes are now cached on the local file system for faster start-up.
Enhanced bytecode analysis to find out getters,setters,adders and removers.
Standard java.util collections can now be used.
Added command-line option to set the trace level of a remote server.
Added menus, trees and tabs to the web gui.
Added "next" and "prev" for collections on the web.
Added toolbars.
Methods can now be displayed in tables.
Added DateHour format for java.util.Date
Added Enums
"Next" and "Prev" buttons for object views from a collection.
Format of floats and doubles.
Diagrams are not saved in a file any more. The standard persistence aspect is used.
Can select the authenticator (Trusting, System)
Custom access control policies can be implemented.
This is a new aspect.
Configuration methods of aspect components are now grouped in interfaces (such as GuiConf, PersistenceConf) so that it's easier to find them.
An IDE in a very first beta version is added (not documented yet). The idea it to allow the programmer to model its applications in a UML-like formalism. The diagrams editors are implemented by using the excellent JHotDraw framework.
See the org/objectweb/jac/src/org/objectweb/jac/ide
directory of the
distribution (launch with jac ide.jac
).
For the moment, the IDE supports (still in a very beta state):
Introduced a component architecture similar to the one used for Swing. See setHTMLTypeViewer and setHTMLTypeEditor of org.objectweb.jac.aspect.gui.GuiAC.
There's a new association aspect. It can be used to automatically updated opposite roles. See the declareAssociation of org.objectweb.jac.core.rtti.RttiAC.
There's now a jac2000.bat for Windows2000 and a jac98.bat for Windows98.
Better error reporting : line numbers should be accurate.
The syntax for blocks was improved to allow multiple values.
Multi-line C-style comments are allowed (/* comments .... */).
A filesystem storage was implemented. It allows you to store objects without having to setup a database.
It is no longer necessary to declare wrapped collections in configuration files.
There is a new aspect to manage transactions. See the bank sample application for an example how to use it. It is still very basic. Expect problems when concurrent transactions occur for instance (the collections modifications merging is not implemented yet).
Added a simple synchronization aspect.
You can now embbed views in the Swing GUI.
A customized GUI (with up to 4 panels) can easily be created.
Added a tree view.
Better handling of multiple modal boxes.
By default, changes in embedded editor are automatically updated when the editor losts its focus.
Possiblity to have commit/cancel buttons for view with embedded editors (when you do not want implicit updates).
Garbage collector (not activated for the moment).
We have changed the syntax of the *.acc files to make it cleaner (there is now a real parser -- Cup -- with a real grammar behind). JAC also supports *.xml parsing thanks to Zac's contribution. For more details, see documentation on configuration syntaxes.
The application and the aspects it contains are not declared anymore in a launching class but in a JAC application descriptor (*.jac).
For instance, if you had a calcul application defined as following:
import org.objectweb.jac.core.*; public class Run { public static void main( String[] args ) { Application app = new Application("calcul",null, "Run",null); app.addAcConfiguration( new ACConfiguration( app, "rtti", "rtti.acc", true ) ); app.addAcConfiguration( new ACConfiguration( app, "gui", "gui.acc", true ) ); ApplicationRepository.get().addApplication( app ); Calcul myCalcul = new Calcul(); } }
The new way of defining this is:
// calcul.jac file applicationName: calcul launchingClass: Run aspects: \ rtti mydirectory/rtti.acc true \ gui mydirectory/gui.acc true
public class Run { public static void main( String[] args ) { Calcul myCalcul = new Calcul(); } }
Consequently, launching a JAC application have changed to:
jac [options] calcul.jac
What is interesting about this new feature is that you do not need to compile again the launching program even when you want to change the way the application declares its aspects.
Distribution is now more flexible since each application can defines its own topology in the corresponding application descriptor. For instance:
// calcul.jac file applicationName: calcul launchingClass: Run aspects: \ rtti mydirectory/rtti.acc true \ gui mydirectory/gui.acc true \ deployment mydirectory/deployment.acc true topology: //localhost/s2
This means that the org.objectweb.jac.topology
property of the
org.objectweb.jac.prop
file is not effective anymore.
Furthermore, the application that defines a topology automatically binds its launching container to the containers of the topology (creating an aspect-space). This topology can be dynamically modified if the aspects allow it thanks to a new event that notifies all the aspects when the topology is changed.
// launches an administration GUI on the container //localhost/s2 jac -A //localhost/s2 // write all the logs (here the gui logs) into a log file jac -V gui -L org.objectweb.jac.log -G myapp.jac // the -D option can take a container name as argument (the // default value is still //localhost/s0 jac -D s3
As a consequence of the last improvement of the -D option and of the distribution enhancement, the -S (slave) option has been removed.
Some bugs fixed, added embedded editors in a general way.
Auto-creation configuration methods added (See org.objectweb.jac.aspects.gui.GuiAC), available on the WEB or for Swing).
It appeared that JAC 0.5.1 had several bugs in the GUI and the distribution. Most of them should be fixed.
Multi-line text editor added in the GUI.
We also added a WEB GUI sample reachable from the WEB on the 8081 port: Live demo of the photos sample (still unstable).
A remote access aspect (org.objectweb.jac.aspects.distribution.RemoteAccessAC) allows JAC clients to seamlessly access JAC servers.
A simple but full application added. See the org.objectweb.jac.samples.contacts package.
It is an application that defines its own SWING GUI. It can be very useful to refer to it since several used features are not yet documented in the tutorial.
It can also be launched in a server mode:
jac -D org.objectweb.jac.samples.contacts.Run serverMode
And in a client mode that uses the data of the launched server instead of local objects (this is a demo on how to use the remote access aspect).
jac org.objectweb.jac.samples.contacts.Run clientMode
Error messages for configuration files should now make more sense.
Quoting values in configuration files is not mandatory any more, and you can declare configuration methods with parameters of type double, int, long, float, boolean, short, Class, ClassItem and AbstractMethodItem.
Pointcuts were enhanced to support path expressions. This new feature is called an OPath and is widely inspired from XPath... For instance, if you have the following program:
class Bank { Vector accounts; // Account instances .... } class Account { Vector owners; // Person instances .... } class Person { ... }
Imagine you do not know the names of the accounts or persons objects but that you want to apply an aspect (e.g. a debugging aspect) to the accounts that belong to a bank called "bank0". Then, in the object expression of the pointcut definition, you simply write:
bank0/accounts/.* Same if you need to denote all the persons that owns an account in "bank0": bank0/accounts/.*/owners/.* This is powerful. Each path element is a regular expression. Thus, if you want to get all the objects related to "bank0" by any relation: bank0/.*/.*
See the JAC programmer's guide for more details.
It is now easier to add custom editors and viewers for new types of values. See GuiAC.setTypeViewer and GuiAC.setTypeEditor.
Introduced currency handling. You can declare a default currency and secondary currencies with their change rate. Then if you declare an attibute to be of type "currency" (see RttiAC.setFieldType) it's editor will allow you to enter the value in one a the declared currencies and will do the conversion. See GuiAC.setDefaultCurrency and GuiAC.declareCurrency.
The format to be used for dates can be set once for all (see GuiAC.setDateFormat). It is use by the date viewer and the date editor for more consistency.
Tables are refreshed (more or less :-).
The layout of swing components is tighter so views take less room.
And the usual bunch of bug fixes.
First, considering several remarks, we have decided to now furnish JAC under the LGPL. This clarifies the fact that, for us, all the developped aspects and application classes that run with JAC are NOT submitted to the license. Of course, modifications of the JAC system classes or of the furnished aspects a subject to the LGPL.
The distribution aspect has been removed and replaced by a set of useful aspects to perform distribution (all these aspects are still in the distribution package):
The core aspect for ditribution is DeploymentAC. It allows the user to easily define various deployment schemes by defining deployment rules (see DeploymentRule) on the objects of the application.
Here is a sample deployment configuration:
// deploys 4 instances of Calcul on a remote JAC server // called //oil/s3 deploy "calcul[1-3]" "//oil/s3" // replicates calcul0 on all the hosts of the topology replicate "calcul0" ".*" // create remote access stubs for calcul2 on all the hosts // of the topology createStubsFor "calcul2" "//oil/s3" ".*"
Note that, to be accessible, the JAC servers must be declared in the org.objectweb.jac.prop of the application by defining the org.objectweb.jac.topology property.
Other aspects enables the programmer to install various protocols once the objects are deployed on a topology (the deployment aspect is always applied first).
Other useful aspects will be provided in next release (and these ones will be enhanced).
The aspect configurations are fetched from the JAC server that is the class repository (note: the classes are fetched from it so that the .class files of the application do not have to be installed on the remote hosts).
Hence, the aspect configurations are consistent all over the topology and you do not need to deploy them.
A pointcut expression defines a set of base objects and methods that need to be wrapped by a given wrapping method.
In JAC 0.4.3, these expressions where standard regular expressions that were quite uneasy to write and read. We have changed this.
A pointcut expression is still based on regular expressions but you can compose them with the && (logical and), || (logical or), and the ! (NOT) operators. Moreover, you can use keywords in the expressions so that it is most of the time very easy to denote a set of methods. Some small examples are better than a long description of the syntax. So, let's give some configuration example of the tracing aspect that uses pointcut expression as an input for the "trace" configuration method:
// traces all the calls on all the objects of the system trace ".*" ".*" ".*"
OR:
trace "ALL" "ALL" "ALL" // traces all the calls on all the methods of all the instances of // classes A and B trace ".*" "A || B" ".*" // traces all the calls on all the methods of the first instances // of classes A and B (their names ends with 0) trace ".*0" "A || B" ".*" // restricts the trace to the f field setters and the f field // getter trace ".*0" "A || B" "GETTER(f) || SETTER(f)" // restricts the trace to all the methods minus the methods that // modify the state of the instances trace ".*0" "A || B" ".* && !MODIFIERS" // traces all the instances of all classes except a0 and only the // methods that read the state of the instances or the getName // method trace ".* && !a0" ".*" "ACCESSORS || getName():String"
Note: the GETTER, SETTER, MODIFIERS and ACCESSORS keywords are using the naming conventions and the RTTI aspect to resolve the actual methods.
Jac should now be faster to load, and invocation of wrapped methods is also much faster.
The Gui aspect was sligthly improved. Editor components now get the focus so that you do not have to click on them in order to start entering values.
New configuration methods captureSystemOut and captureSystemErr to control wether stdout and stderr are captured and redirected into a tab of the GUI.
The Swing GUI now use sessions so that for instance, you do not have to enter your username and password each time you invoke a method restricted by the authentication aspect.
ComboBoxes can now be editable (see
GuiAC.setFieldChoice
and
GuiAC.setMethodDynamicParameterChoice
). Also, items
are sorted.
The trace editor now accepts regular expressions in put(). For
instance, put("gui.*",1)
enables all trace
categories starting with "gui".
InputCanceledExceptions are now silently discarded.
It is now configurable; you can specify which attributes must
be saved and restored (See
SessionAC.declareStoredAttributes
).