I have started a demos project, which can be found in upstream.
It currently contains the following examples
-sar
-managedbean
-serviceloader
-messaging
To run an example, make sure AS7 is running and then
cd demos
mvn install -Dexample=sar
A few issues I came across when working on this are:
Deployment
-Deployment to domain/deployments does not work, have to do standalone
-Deleting .deployed archive still leaves it hanging around in standalone.xml. To undeploy need to delete from standalone.xml's deployments
-.DS_Store gets picked up as a deployment
-Slightly annoying having to specify the full module path in user deployments, not very user friendly? Will get worse when there are more modules.
-BeanWithSimpleInjected.simple is sometimes null
-ServiceLoader example no longer picks up services
-I am currently just copying to the deployments/ directory, what is the status on the deployment API?
-Deployment to domain/deployments does not work, have to copy to standalone/deployments
-Deleting .deployed archive still leaves it hanging around in standalone.xml. To undeploy need to delete from standalone.xml's deployments
-.DS_Store (on OS X) gets picked up as a deployment
Module Dependencies
-It is slightly annoying having to specify the full module path in user deployments, not very user friendly? This will get worse when there are more modules in the server.
Examples
The 'sar' and 'messaging' examples work fine, but there are some problems with the others.
For the 'managedbean' example, there is
public class BeanWithSimpleInjected {
private final Logger log = Logger.getLogger(BeanWithSimpleInjected.class);
@Resource
private SimpleManagedBean simple;
...
Sometimes the simple field is null, other times it is injected as expected. I added the functionality to have an @AroundInvoke method on the bean class itself.
The 'serviceloader' example used to work fine in my development branch but following a rebase against upstream the service loader no longer finds the services.