Hi All
I am writing a simple web app that contains certian scoped session objects. I need to pass these objects to some EJBs. However because the objects are session scoped, the objects that are returned to me by the spring container are proxies and hence I get a ClassNotFoundException as the EJBs expects the target objects and not a proxy. I wanted to know how I can obtain the target objects of these proxies. I am usng CGLIB. Some sample code of how this is done will be greatly appreciated.
Here is my bean config for the scoped session object that needs to be passed to the EJB
Here is my code passing the object from above to the EJBCode:<bean id = "contactDetails" class ="com.raptorsoftdynamics.ejb.ContactDetails" scope="session"> <aop:scoped-proxy /> </bean>
Code:public void setContactDetails(ContactDetails contactDetails) { this.contactDetails = contactDetails; } public boolean registerUser(){ ContactDetails model = this.contactDetails; boolean registered = false; registered=userBean.register(model.getUsername(),model.getPassword(),model.getConfirmedPassword(), model.getEmail()),model.getConfirmedEmail()); return registered; }
The error I get is
ThanksCode:Missing class: com.raptorsoftdynamics.ejb.CustomerDetails$$EnhancerByCGLIB$$4575aa43


Reply With Quote