Results 1 to 2 of 2

Thread: proxyInterface on JndiObjectFactoryBean fails on WL 6.1

  1. #1
    Join Date
    Apr 2005
    Posts
    14

    Default proxyInterface on JndiObjectFactoryBean fails on WL 6.1

    We need lazy loading of our queue connection factory.

    Setting 'lookupOnStartup' to false and 'proxyInterface' to javax.jms.QueueConnectionFactory on our JndiObjectFactoryBean does not work.

    The reason for this is that Weblogic checks that the factory is an instance of the Weblogic factory implementation. Since the instance is actually a Spring generated proxy it is rejected by WL as a 'foreign' factory.

    Does anybody know if its possible to make the proxy an instance of the actual Weblogic class (like the 'proxyTargetClass' attribute does for the ProxyFactoryBean)?

  2. #2
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    I'm afraid that you won't be able to use JndiObjectFactoryBean's lazy-fetching in this case.

    Instead, try using a JndiDestinationResolver on your JmsTemplate, passing in destination names via the corresponding JmsTemplate operations: the destination name will get interpreted as JNDI location there, being lazily fetched.

    You can also switch JndiDestinationResolver's "cache" flag to "false", enforcing a fresh JNDI lookup for each JMS operation.

    Actually, I've just noticed that there is no way to specify the default destination as name on JmsTemplate. All operations have overloaded variants with a Destination and a destination name, but the "defaultDestination" can only be specified as Destination object.

    Thus, I've just added a "defaultDestinationName" property to JmsTemplate, allowing for resolving the default destination dynamically. In combination with a JndiDestinationResolver specified as "destinationResolver", this should give you the desired lazy JNDI lookup in a convenient fashion even for the default destination.

    "defaultDestinationName" will be in the upcoming 1.2 RC2.

    Juergen

Similar Threads

  1. Replies: 7
    Last Post: Dec 22nd, 2011, 05:11 AM
  2. Replies: 18
    Last Post: Nov 21st, 2008, 06:02 PM
  3. Replies: 1
    Last Post: Aug 18th, 2006, 11:04 PM
  4. Stop validation if binding fails.
    By sherihan in forum Web
    Replies: 0
    Last Post: Feb 8th, 2005, 03:18 AM
  5. Replies: 1
    Last Post: Aug 20th, 2004, 11:11 AM

Posting Permissions

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