Results 1 to 4 of 4

Thread: xalan.jar - is it really required ?

  1. #1
    Join Date
    Sep 2008
    Posts
    21

    Default xalan.jar - is it really required ?

    Hi All:
    when trying to deploy the application i was getting some errors which got resolved by putting xalan.jar in /WEB-INF/lib since it was missing with the original install files.
    not sure if this was supposed to happen.

    regards,
    rohit

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    It depends what version of JVM you are using. BlazeDS provides multiple implementations of their XPath-based ConfigurationParser, and we configure the Xalan one by default because of noted performance problems with the XPath implementation in the 1.5 JDK.

    The BlazeDS implementation of ConfigurationManager uses some class loading tricks to determine which ConfigurationParser to install, but since those tricks can lead to problems in an OSGi environment, we chose in our ConfigurationManager implementation to install the Xalan based parser by default but leave it configurable via Spring configuration.

    So if you really don't want to use Xalan, and you're okay with the 1.5 Xpath implementation, you should be able to configure the MessageBroker something like the following as an alternative:

    Code:
    <!-- Bootstraps and exposes the BlazeDS MessageBroker -->
    <bean id="mySpringManagedMessageBroker" 
        class="org.springframework.flex.messaging.MessageBrokerFactoryBean" >
        <property name="configurationManager" ref="flexConfigurationManager"/>
    </bean>
    	
    <!-- Configuration manager that uses the JDK 1.5 ConfigurationParser instead of Xalan -->
    <bean id="flexConfigurationManager" 
        class="org.springframework.flex.messaging.config.FlexConfigurationManager">
        <property name="configurationParser">
            <bean class="flex.messaging.config.XPathServerConfigurationParser"/>
        </property>
    </bean>
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3
    Join Date
    Nov 2008
    Location
    Dallas, TX
    Posts
    16

    Default Doesn't quite work in its current state

    FlexConfigurationManager does not have a default constructor and thus cannot be used as you suggest (unless there is some way I don't know about, to use constructor injection and pass in the ResourceLoader...). Currently, it has a 2 parameter constructor - 1) A ResourceLoader. 2) A configuration path String.

    It should probably implement ResourceLoaderAware to take care of the first param. And the second could be injected (if there were a default constructor).


    Adam

  4. #4
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    Ahh, good point, that needs to be fixed. Created an issue for it: http://jira.springframework.org/browse/FLEX-19
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •