[JBoss-dev] [JBoss IDE (dev)] - Re: Unable to find a javac compiler for JSPs
My fix for this is to ensure tools.jar is in the bootstrap classpath in the server configuration. It is not included as a JRE library by default. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3856067#3856067 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3856067 --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Javassist development Forum] - WildcardLoader
In addition to an enhancement to allow Constructor interception, I have also extended the reflective Loader to produce a WildcardLoader, which allows entire packages to be registered for reflection during classloading. Any interest? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3857642#3857642 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3857642 --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Tomcat] - jboss-web_3_2.dtd, multiple s
I note from http://www.jboss.org/wiki/Wiki.jsp?page=VirtualHosts (bottom of page), that it is possible to define multiple s for which a WAR should be deployed. (Aside - anyone doing this pre JBoss 3.2.4/Tomcat 5.x?). Anyway, http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd defines ELEMENT jboss-web ... virtual-host?, so I am wondering if the DTD should be updated for 3.2.4 (it still appears to have the above definition), to allow virtual-host*. Regards Brett Randall View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837694#3837694 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837694 --- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Javassist development Forum] - Extending Reflection to intercept Constructors
I am using the Javassist Loader and Reflection classes from javassist.reflect, to stub-out and mock classes transparently, especially when performing unit tests. I have found that when used with the reflective Loader, Reflection can stub-out and intercept everything (i.e. methods, fields, statics) with the exception of Constructors. In order to be able to transparently mock certain classes, I need to be able to intercept their constructors, as these may throw Exceptions, e.g. due to resource dependencies that we are trying to mock-out, such as database connections etc. I have started adding constructor interception as an optional feature of javassist.reflect.Reflection, and the purpose of this posting is to seek community feedback on whether others might find this sensible/useful. Depending on what is possible through the rest of the API, particularly CtNewConstructor, I am thinking that the best design approach might be to copy the way Method interception works, by "moving" the real Methods and introducing a delegating stub Constructor. I'm guess that this will delegate to a Method in a subclass of Metaobject. As the real classes' Constructor has been intercepted, it would then be up to the Metaobject to instantiate a suitable replacement underlying object to delegate to. Any other approaches? Any thoughts/comments, however brief, most welcome ... I need to code this now ... may need some help from interested parties ... Brett Randall View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841143#3841143 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841143 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Javassist development Forum] - Re: Extending Reflection to intercept Constructors
OK, that approach won't quite work, as it doesn't make sense to try and rename the Constructors as is done with the Methods. I have succeeded in "hard intercepting" the construction by calling (on CtConstructor): insertBeforeBody("return;");, which is handy as it retains the correct (implicit or explicit) super(..) call to the superclass constructor, and blocks the remainder of the constructor from executing. It does however prevent the real original code in the Constructor body from being executed later if required. Since renaming is probably not on, I see a couple of other options: 1) Before inserting the "return;", copy the Constructor body (after any super(...)), converting it into a factory method. 2) Try and make the execution of "return;" conditional in some way, based on a field. I'm thinking that the second one may be the simplest. Brett Randall View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841296#3841296 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841296 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Javassist development Forum] - CtNewMethod on static fields, bug submitted
See http://sourceforge.net/tracker/?func=detail&aid=987038&group_id=22866&atid=376685. A failing TestCase is provided. I notice that the code deliberately treats statics differently: if ((finfo.getAccessFlags() & AccessFlag.STATIC) == 0) { | code.addAload(0); | code.addLoad(1, field.getType()); | code.addPutfield(Bytecode.THIS, fieldName, fieldType); | } | else { | code.addLoad(0, field.getType()); | code.addPutstatic(Bytecode.THIS, fieldName, fieldType); | } Any ideas what the problem could be? Thanks Brett Randall View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841302#3841302 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841302 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Javassist development Forum] - Re: CtNewMethod on static fields, bug submitted
Had a guess: else { | code.addLoad(1, field.getType()); // change 0 to 1 | code.addPutstatic(Bytecode.THIS, fieldName, fieldType); | } fixes my unit test, not sure if it is correct or if it breaks other cases. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841305#3841305 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841305 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Javassist development Forum] - Re: Extending Reflection to intercept Constructors
I now have a working version based on 2) above, by adding a boolean field to the class, which is set during the instantiation of the embedded Metaobject (this is an instance field and is instantiated straight after the super(...) constructor runs and prior to the execution of the remainder of the constructor). The field determines whether the full constructor (after any explicit or implicit call to super(...)) should be intercepted (effectively stopped). The constructor is enhanced through the following code in Reflection: CtConstructor c; | ... | c.insertBeforeBody("if (" + interceptConstructorField + ") {return;}"); ... where interceptConstructorField contains the name of the new boolean field added to the class. This field is set in the constructor of the Metaobject based on an equivalent new (static) boolean field in Metaobject. So, if: Metaobject.setInterceptConstructor(true) ... is called, when the next instance of the reflected class is instantiated, only its superclass constructor will run, as the inserted return will be reached. Set it back to false, and the full constructor will run for the next instance. The design uses static fields and methods in Metaobject (should these live instead in ClassMetaobject?), as the instance of Metaobject is not instantiated until during the instantiation of the reflected object. This made me realise that the additional field within the reflected class is probably not needed, rather: c.insertBeforeBody("if (" + metaobjectGetter + "().isInterceptConstructor()) {return;}"); ... is just as effective, with the slight disadvantage being that there is no way down the track to tell whether a particular reflective object's constructor was intercepted. So maybe the field should stay. I have a full set of jUnit tests. Could someone please advise me on how best to contribute this enhancement? Brett Randall View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841442#3841442 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841442 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Javassist development Forum] - javassist.reflect contruction interception draft
I have posted a proposed enhancement to the javassist.reflect package, to support constructor interception. The enhancement provides the following additional features: An event is generated prior to the calling of a reflected class's super constructor. An event is generated prior to the calling of a reflected class's constructor body. This event has access to the object under-construction, and can optionally bypass the constructor body if required (the default behaviour is to execute the constructor body. An event is generated at the completion of the reflected class's constructor body. The entire body is wrapped in a try/catch block that will catch unchecked Throwables (RuntimeException and Error), as well as any checked Exceptions declared in the constructor. The caught Throwables are available to the event along with the object under-construction, and by default they are re-thrown, or they can optionally remain caught. The three events are available as three new callback methods in ClassMetaobject: public void trapBeforeSuperConstructor() throws Throwable {} | public boolean trapBeforeClassConstructor(Object underConstruction) throws Throwable {} // return false to bypass constructor body | public boolean trapAfterClassConstructor(Object underConstruction, Throwable threw) throws Throwable {} // return false to prevent re-throw Initially I had though to attempt to wrap the constructors using CtNewWrappedConstructor or similar, or replicating the constructors as a static factory method. This was less attractive when I considered the additional difficulty of actually replacing the object constructed in memory. The main TODO is to make the constructor arguments available to the events as Object[]. I guess this would be fairly easy with a WrappedConstructor, but another construction is not what I was after. This proposed enhancement is posted on Sourceforge for review. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3843615#3843615 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3843615 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Tomcat] - Setting char encoding of Response to UTF8, -Dfile.encoding=U
I would like to force responses to be encoded in UTF8. I start JBoss with JVM arg -Dfile.encoding=UTF8, and this has become the default encoding within the container, however the Coyote Response appears to always be with character encoding of ISO-8859-1. I am picking this up within a servlet Filter. JDK 1.4.2_05 on Win2k, JBoss 3.2.5 + TC5. Locale is en/us. Any advice appreciated. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845788#3845788 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845788 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development