Announcement Announcement Module
Collapse
No announcement yet.
proxyInterface on JndiObjectFactoryBean fails on WL 6.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment

    Working...
    X