hi!
I'm leaving for Australia sept. 8, and am not taking
a computer with me. This means I will not participate
in Avalon Development for (estimated) 7 1/2 months.
I will be back after that.
It's been great fun working on Avalon, I've learned a
lot about many things in doing so and intend to get
back to it as soon as I have a computer again. Of course,
I expect y'all to have a complete release out by then =)
Two things have really been "my pets": XCommander & JMX.
Here's info about them for those that wish to refactor/
code/use it.
---
JMX
---
JMX is very cool, there are also some serious errs in the
current spec which I haven't got around to solving, which
is why the code in org.apache.jmx.introspector is not
functioning the way it should.
The problem is that most classes in javax.management do not
override equals(). This leads to a utility function like
/**
* Strips the attributes array from unwanted entries.
*/
protected void restrictOperationsTo( Class[] interfaces ) throws
IllegalArgumentException
{
ArrayList allowedOperations = new ArrayList();
ArrayList operationInfo = new ArrayList();
for( int i = 0; i < interfaces.length; i++ )
{
BeanInfo beanInfo = null;
try { beanInfo = Introspector.getBeanInfo( interfaces[i] ); }
catch( Exception e ) {
throw new IllegalArgumentException(
"The supplied interfaces are not all valid
javabeans!" ); }
final MethodDescriptor[] md = beanInfo.getMethodDescriptors();
for( int j = 0; j < md.length; j++ )
{
final MBeanOperationInfo info = new MBeanOperationInfo(
md[i].getShortDescription(),
md[i].getMethod() );
allowedOperations.add( info );
}
}
MBeanOperationInfo[] m =
(MBeanOperationInfo[])allowedOperations.toArray( new
MBeanOperationInfo[0] );
for( int i = 0; i < m.length; i++ )
{
for( int j = 0; j < m_operations.length; j++ )
{
if( m[i].equals( m_operations[j] ) )
operationInfo.add( m_operations[j] );
}
}
m_operations = (MBeanOperationInfo[])operationInfo.toArray( new
MBeanOperationInfo[0] );
}
not functioning. The solution is to replace all calls to equals()
with a utility method that does work. After that, introspection
should work and it should be easy to use it in the phoenix Manager.
The code also needs some refactoring (as per my last e-mail) and
testing.
Note that it might not be a good idea to try and follow all of
the JMX spec on the initial run. Instead, wrap the RI and rely on
it to handle all stuff we have no time for. Note that there are
several open source projects that include it in a download. I am
not sure whether sun's license is compatible with the apache
license; this is something to look at.
Paul (or anyone else), if you will be looking into this, cool =)
I will try to get to my e-mail on friday to answer any questions.
After that, it will take weeks.
----------
XCommander
----------
The basic thought behind XCommander is really cool. It can serve
as a framework for building apps talking to flash 5. It works
perfectly and scales pretty well. The main thing it needs is some
refactoring to separate the delegating sax handler from the rest
so it's use becomes even broader.
Also, a common need for flash 5 apps is support for user management;
it would make sense to provide hooks to use the recently discussed
avalon user management code.
The docs on it are pretty extensive; the only part lacking here are
unit tests.
Finally, with a little refactoring XCommander could really be a
selling point for Avalon, as everyone is doing flash right now and
with the v5 plugin become ever wider distributed it is becoming
a real option to use for just about any client-server app.
There's a mail server, an ftp server and an xml socket server
running on top of Avalon. All we need now is the web/appserver (tomcat)
running on it...
bla, bla, bla. Gotta start packing...
greetz,
- Leo Simons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]