2 Replies Latest reply on Aug 20, 2002 4:01 AM by Rick Ross

    JDK 1.4 Dillema

    Binoy Shah Newbie

      Hi,

      We all have been hearing about the Jdk 1.4 hype lately about how the new java.nio packages work and are quite advantageous over the traditional io packages.

      I was wondering how it could provide more advantage if it was incorporated into Jboss. Or would it provide any advantage in terms of performance/speed.

      Jboss still is suggested to run on 1.3+ jvms, is there any move towards shifting Jboss to take advantage of jdk 1.4 ?

      Is any body listening ?

      Cheers

        • 1. Bug in getDeclaringClass in 3.0RC1
          Rick Ross Newbie

          There is a bug in the getDeclaringClass method of CtClass when you try and get the declaring class of an anonymous inner class it throws FileNotFoundException. EG:

          package examples.javassisttests.declaringclasses;
          import javassist.*;
          public class Test {
          public static void main( final String[] notUsed ) throws NotFoundException {
          new Object() {}; // annonymous inner class
          final CtClass inner = ClassPool.getDefault().get( "examples.javassisttests.declaringclasses.Test$1" );
          System.out.println( "Inner class = " + inner.getName() );
          System.out.println( "Outer class (direct) = " + ClassPool.getDefault().get( "examples.javassisttests.declaringclasses.Test" ).getName() );
          System.out.println( "Outer class (from inner) = " + inner.getDeclaringClass().getName() );
          }
          }

          Produces:

          Inner class = examples.javassisttests.declaringclasses.Test$1
          Outer class (direct) = examples.javassisttests.declaringclasses.Test
          javassist.NotFoundException
          at javassist.ClassPool.get(ClassPool.java:295)
          at javassist.CtClassType.getDeclaringClass(CtClassType.java:412)
          at examples.javassisttests.declaringclasses.Test.main(Test.java:9)
          Exception in thread "main"

          • 2. Re: JDK 1.4 Dillema
            Hezekiel Newbie

            Been using the 3.0.1 with jdk 1.4 for a month now. No problems so far. As for the advantages you automatically get more faster serialization times with 1.4
            IO? you're not supposed to do any IO-ops from your EJBs, but your own JCA connectors might benefit from those.