I've implemented a way to customize the serialization of EJBs through
dot-betwixt-files.

My solution looks up the dot-betwixt-file if the class to serialize is a
Proxy. I only changed some lines in XMLIntrospector.findByXMLDescriptor.

    protected synchronized XMLBeanInfo findByXMLDescriptor( Class aClass ) {
        Class showClass = aClass;

        // If the class is a Proxy, use the interface
        if ( Proxy.isProxyClass(aClass) && aClass.getInterfaces().length >
0 ) {
            showClass = aClass.getInterfaces()[0];
        }

        // trim the package name
        String name = showClass.getName();
        int idx = name.lastIndexOf( '.' );
        if ( idx >= 0 ) {
            name = name.substring( idx + 1 );
        }
        name += ".betwixt";

        URL url = showClass.getResource( name ); // Use showClass
classloader

This works fine.

I have two questions left:

- How/Where can I change behavior to use the interface-Description instead
of the classes one if no dot-betwixt-file ist found?

- Is there any chance to integrate my mechanism into betwixt? Is there
anybody else also interested in such a behavior?

Any respone would be appreciated.

regards
Christoph






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to