<?xml version="1.0" encoding="ISO-8859-1"?>

<faqs title="Frequently Asked Questions">

    <part id="General">

        <title>General</title>

        <faq id="general/what is aw">

            <question>

                What is AspectWerkz?

            </question>

            <answer>

                <p>

                    <code>AspectWerkz</code> is a dynamic, lightweight and

                    high-performant AOP/AOSD framework for Java.

                </p>

            </answer>

        </faq>

        <faq id="general/app server command line tool">

            <question>

                How can I use it without starting up the application or application server with the command line tool?

            </question>

            <answer>

                <p>

                    You can post-process (instrument/transform) your source files before use. See the

                    <a href="documentation.html#Startup and transformations">Startup and transformations</a>

                    section.

                </p>

                <p>

                    You can also use one of the several options to start your application with AspectWerkz enabled without

                    the command line tool.

                    <br/>

                    For a complete discussion on this topic, see the

                    <a href="online.html">Online architecture</a> section.

                </p>

            </answer>

        </faq>

        <faq id="general/what does command line tool">

            <question>

                What does the aspectwerkz command line tool do?

            </question>

            <answer>

                <p>

                    Basically it just invokes the normal java command line tool

                    by calling a class that intercepts the normal class loading

                    scheme before it invokes the main class specified. This means

                    that you can just substitute the normal call to:

                    <br/>

                    <code>java -cp .. -D.. mainclass args</code> with:

                    <code>aspectwerkz -cp .. -D.. mainclass args</code>

                    and everything should work as before, the only difference

                    is that all classes that are loaded will be transformed

                    (if they are defined to). You can even hack the startup

                    script of your favorite application server and start it up

                    using the

                    <code>aspectwerkz</code> command line tool as

                    outlined above, or using directly aspectwerkz-core-

                    <i>version</i>.jar facilities.

                </p>

                <p>

                    The key advantage of the command line tool when you startup your application

                    thru it is that it provides an autodetection mechanism for java 1.3 / java 1.4 support.

                    The online architecture differs between these two java version.

                    <br/>

                    For full control on the behavior of AspectWerkz online mode (dump class, verbosity), you should

                    avoid using the command line tool.

                    <br/>

                    Read more in the

                    <a href="online.html">Online architecture</a> section.

                </p>

            </answer>

        </faq>

        <faq id="general/change at runtime">

            <question>

                If I use the post-processor, I'll lose the possibility to change my configurations at runtime, right?

            </question>

            <answer>

                <p>

                    Actually no. You will still be able to to all the things covered in the

                    <a href="documentation.html#Hot deployment">Hot deployment section</a>

                    of the documentation. Like swapping the implementation of a Introduction or change the order or

                    of advices and so on. The only things you can not do are introducing

                    <b>new</b>

                    Introductions and advise

                    <b>new</b> methods.

                </p>

            </answer>

        </faq>

        <faq id="general/dtd">

            <question>

                Is there any DTD or XML Schema I can use to write the AspectWerkz XML definition fil?

            </question>

            <answer>

                <p>

                    The DTD is provided since 0.8. Each distribution comes with a bundled DTD so that it is not looked

                    for on the web at runtime.

                    <br/>

                    When you write your XML definition file, add the following at the top of your XML.

                    <!-- faq.fml does not handle correctly &lt; chars in CDATA with maven (1b10) -->

                    <source>

                        &lt;!DOCTYPE aspectwerkz PUBLIC

    "-//AspectWerkz//DTD 1.0//EN"

    "http://aspectwerkz.codehaus.org/dtd/aspectwerkz_1_0.dtd"&gt;

                    </source>

                    The DTD for the latest release is also always referenced with

                    <source>

                        &lt;!DOCTYPE aspectwerkz PUBLIC

    "-//AspectWerkz//DTD//EN"

    "http://aspectwerkz.codehaus.org/dtd/aspectwerkz.dtd"&gt;

                    </source>

                </p>

            </answer>

        </faq>

        <faq id="general/build">

            <question>

                Why can't I build AspectWerkz in a directory whose name contains whitespaces?

            </question>

            <answer>

                <p>

                    The Ant or Maven based build will fail if the

                    <code>ASPECTWERKZ_HOME</code> (basedir) is a directory

                    whose name contains whitespace(s). This would drastically complexify the script if we had to

                    escape the whitespaces and thus this is not supported for convenience reason.

                </p>

                <p>

                    The AspectWerkz online and offline mode (command line tool etc) support path whose

                    elements contains whitespace(s) in their names.

                </p>

            </answer>

        </faq>

    </part>

<!--    <part id="migration">-->

<!--        <title>Migration</title>-->

<!--        <faq id="migration/0.9">-->

<!--            <question>-->

<!--                What is the migration effort to upgrade a 0.8.x application to a 0.9?-->

<!--            </question>-->

<!--            <answer>-->

<!--                <p>-->

<!--                    The DTD has been made more strict and some deprecated elements or attributes have been removed.-->

<!--                    By referencing the DTD when you edit your XML definition files from within any IDE you will have basic color syntax highlighting.-->

<!--                </p>-->

<!--                <p>-->

<!--                    The list of DTD elements is mainly related to-->

<!--                    <code>system</code> element,-->

<!--                    <code>*-def</code> and-->

<!--                    <code>*-ref</code> style within-->

<!--                    <code>bind-*</code> elements, and-->

<!--                    <code>advice=...</code> replaced by-->

<!--                    <code>class=</code>.-->

<!--                    See the DTD itself for a more detailled list.-->

<!--                </p>-->

<!--                <p>-->

<!--                    The 0.8 Aspect model is now called-->

<!--                    <a href="core_concepts.html#Model 1 - XML centric">Model 1 - XML centric</a> and basically core classes-->

<!--                    have been moved to-->

<!--                    <code>org.codehaus.aspectwerkz.xmldef.</code> package (except JoinPoint and related).-->

<!--                </p>-->

<!--            </answer>-->

<!--        </faq>-->

<!--        <faq id="migration/changes">-->

<!--            <question>-->

<!--                What should I change in my project running on 0.7.4 to make it run on 0.8 and later?-->

<!--            </question>-->

<!--            <answer>-->

<!--                <p>-->

<!--                    The 0.8 brings a new architecture, and we limited the impact it has on end users and added value projects-->

<!--                    redistributing AspectWerkz. There might still be some change to reflect in your projects.-->

<!--                </p>-->

<!--                <p>-->

<!--                    The command line tool-->

<!--                    <code>bin/aspectwerkz</code> hides you the details. For online mode, you have nothing to change-->

<!--                    if you are using this script. For offline mode, the definition file must now be the first argument given - as detailled-->

<!--                    <a href="startup_and_runtime_issues.html#Startup and transformation issues">here</a>.-->

<!--                </p>-->

<!--                <p>-->

<!--                    If you were using directly the java classes instead of the command line tool, note the following changes:-->

<!--                    <ul>-->

<!--                        <li>-->

<!--                            <code>org.codehaus.aspectwerkz.hook.ProcessStarter</code> can be used to start a JVM in online-->

<!--                            mode (instead of-->

<!--                            <code>org.cs3.jmangler.hook.starter.CLSubstitutor</code>). This class is packaged-->

<!--                            in-->

<!--                            <code>aspectwerkz-core-&lt;version&gt;.jar</code>, and you will need to add in the classpath-->

<!--                            <code>bcel.jar</code> and-->

<!--                            <code>JAVA_HOME/lib/tools.jar</code>.-->

<!--                            <br/>-->

<!--                            Refer to the-->

<!--                            <a href="online.html">online architecture section</a> since there are now several other options to start-->

<!--                            a JVM in online mode.-->

<!--                            <br/>-->

<!--                        </li>-->

<!--                        <li>-->

<!--                            <code>org.codehaus.aspectwerkz.compiler.AspectWerkzC</code> must be used for offline-->

<!--                            compilation (instead of-->

<!--                            <code>org.cs3.jmangler.offline.starter.Main</code>). This class is packaged-->

<!--                            in-->

<!--                            <code>aspectwerkz-&lt;version&gt;.jar</code>, and you will need to add in the classpath-->

<!--                            <code>bcel.jar</code> and-->

<!--                            <code>ant-1.5.2.jar</code> (or any Ant version 1.5 or later).-->

<!--                            <br/>-->

<!--                        </li>-->

<!--                    </ul>-->

<!--                </p>-->

<!--            </answer>-->

<!--        </faq>-->

<!--        <faq id="migration/removed files">-->

<!--            <question>-->

<!--                Are there any files not needed starting from 0.8 release?-->

<!--            </question>-->

<!--            <answer>-->

<!--                <p>-->

<!--                    The JMangler jars are not needed. AspectWerkz has now total source and architecture control over the low layer-->

<!--                    part of enabling online mode, which allow us to bring state of the art features.-->

<!--                    <br/>-->

<!--                    As a consequence, the JMangler specific configuration files have been removed (-->

<!--                    <code>ASPECTWERKZ_HOME/config</code>).-->

<!--                </p>-->

<!--            </answer>-->

<!--        </faq>-->

<!--    </part>-->

    <part id="BEA integration">

        <title>BEA integration</title>

        <faq id="bea/jrockit">

            <question>

                Does AspectWerkz support BEA JRockit?

            </question>

            <answer>

                AspectWerkz supports BEA JRockit thru a dedicated module wich relies on a low level BEA API.

                It makes AOP integration on BEA JRockit much easier than for HotSpot. <a href="online.html#BEA_JRockit">Read more</a>.

            </answer>

        </faq>

        <faq id="bea/wls81">

            <question>

                I am having troubles with WebLogic Server / Integration when using AspectWerkz, with a "getEncoding" error !

            </question>

            <answer>

                This is a known conflict between <i>piccolo.jar</i> that ships with AspectWerkz and the WebLogic 8.1 product line.

                Rename the <i>lib/piccolo.jar</i> in <i>lib/piccolo.jar.IGNORE</i> in the AspectWerkz distribution.

            </answer>

        </faq>

    </part>



    <part id="Other">

        <title>Other</title>

        <faq id="other/ibm">

            <question>

                Does AspectWerkz supports custom JRE like IBM ones?

            </question>

            <answer>

                AspectWerkz supports all java environment thru offline mode. With online mode, AspectWerkz hooks at the class loader level.

                AspectWerkz provides a transparent mechanism that support the IBM JRE which bundles a specific

                <code>java.lang.ClassLoader</code>.

            </answer>

        </faq>

        <faq id="other/bea">

            <question>

                Does AspectWerkz support BEA JRockit?

            </question>

            <answer>

                AspectWerkz supports BEA JRockit thru a dedicated module wich relies on low level BEA API.

            </answer>

        </faq>

        <faq id="other/java 1.3">

            <question>

                    Does AspectWerkz support Java 1.3?

            </question>

            <answer>

                    Yes it does.

                <br/>

                    First add the

                <code>piccolo-1.03.jar</code> file in your

                <code>JAVA_HOME/jre/lib/ext/</code>.

                <br/>

                    You will need to add xerces.jar as well at this location.

                <br/>

                    Second, start your VM with the extra option

                <code>-Djavax.xml.parsers.SAXParserFactory=com.bluecast.xml.JAXPSAXParserFactory</code>.

                <br/>

                    If you encounter troubles in your environment (IDE etc), just remove the

                <code>piccolo-1.03.jar</code> file from your

                <code>JAVA_HOME/jre/lib/ext/</code> when done.

            </answer>

        </faq>

    </part>

</faqs>