• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

session.getAttribute(key) method is returning different object than the expected one

 
Greenhorn
Posts: 8
MySQL Database Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I have one sessionBean which(its methods) is called using a front end. In front end code after JNDI lookup(first time after login) I am setting 'Handle' object (EJBObject.getHandle()) in HttpSession as attribute so there is no need to lookup for consecutive calls. But when I try to get the Handle from HttpSession I get EJBObject and JVM throws ClassCastException.

So I thought that it is getting overwritten somewhere else in the code so I implemented HttpSessionAttributeListener and found out that it wasn't getting overwritten.

I am using WebLogic Server Version: 12.1.2.0.0

Any help will be much appreciated.

Thanks.
 
I brought this back from the farm where they grow the tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic