8 Replies Latest reply on Apr 22, 2005 3:05 AM by ifrit

    Error Injections



      Is it possible to inject Error with jboss aop, i can inject Excpetions successfully but Error injections like OutOfMemoryInjections don't seems to work.


        • 1. Re: Error Injections

          can you be more specific?

          • 2. Re: Error Injections

            The error thrown when memory is exhausted is constructed at jvm boot time,
            otherwise it might not have enough memory to even construct that Throwable
            object on the heap.

            So there is no way to intercept the new OutOfMemoryError() when it is actually
            thrown, because it is not constructed at that time.

            Assuming that memory is already exhausted (and it is some other problem like
            thread construction), you wouldn't be able to do anything anyway.
            Trying to handle any of the JVM internal errors is a crapshoot. The JVM itself
            has already given up and failed the request.

            • 3. Re: Error Injections

              I'm not sure that's what he wants to do. He'll have to clarify what he means by "Error Injections".

              • 4. Re: Error Injections

                well problem is cleared, i can now throw error when a specific method is called. but sometimes it won't work, maybe some pb with eclipse, i got that kind of pb really often. but well for the moment everything works good except one thing. i can't intercept method call within a jar, i have turn EnableTransformer to true in jboss-service.xml, but no way to intercept precompiled class.

                • 5. Re: Error Injections

                  what do you mean by "precompiled class". Also, can you try outside of Eclipse? I personally do not use eclipse, so you'll have to get Kabir or Raymond to test it out.

                  • 6. Re: Error Injections

                    well i got the jar file of quartz to scheduled my jobs, i wan't to intercept some calls in fonctions that i use in quartz, and it will not work, but if i get the source of quartz in eclipse i can intercept these calls.

                    • 7. Re: Error Injections

                      seems like a JBoss AOP Eclipse integration problem then?

                      • 8. Re: Error Injections

                        yes maybe