Results 1 to 3 of 3

Thread: Hoeller, How JndiObjectFactoryBean avoid ClassCastException?

  1. #1
    Join Date
    Aug 2010
    Location
    BeiJing
    Posts
    13

    Default Hoeller, How JndiObjectFactoryBean avoid ClassCastException?

    Hey Hoeller:

    I binded a custom service(a pojo) to the JNDI context in one Web Application.
    Then I get the reference to the service from the JNDI context from the other Web Application.
    Because the current classloader in JSP is different from the classloader of the binding service from JNDI.
    So when I cast the type in JSP, ClassCastException is thrown.

    But when I use JndiObjectFactoryBean to access the service from the JNDI, It works well.
    I don't understand how it can avoid the ClassCastException?
    Last edited by wangyin; Aug 21st, 2010 at 01:32 AM.

  2. #2
    Join Date
    Aug 2010
    Location
    BeiJing
    Posts
    13

    Exclamation

    Is anyone can help me?

  3. #3
    Join Date
    Aug 2010
    Location
    BeiJing
    Posts
    13

    Default


Tags for this Thread

Posting Permissions

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