Issue Details (XML | Word | Printable)

Key: OSGI-797
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Costin Leau
Reporter: Thierry Templier
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring OSGi

Problem when using OSGi services configured with Spring DM within DWR

Created: 11/Jan/10 04:51 AM   Updated: 22/Jan/10 08:02 AM
Component/s: CORE
Affects Version/s: 1.2.1
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Java 1.6, Linux


 Description  « Hide
Hello,

I raise an issue within the DWR JIRA (http://directwebremoting.org/jira/browse/DWR-429) about a problem when trying to expose an OSGi service configured with Spring through DWR support.

It seems that this problem is caused by Spring DM proxy in front of OSGi service since problem occurs when trying to get type for corresponding bean with the getType method of Spring Bean Factory.

this.beanClass = beanFactory.getType(beanId);

Using the following code solves the problem:

this.beanClass = beanFactory.getBean(beanId).getClass();

Thierry

Costin Leau added a comment - 18/Jan/10 05:13 AM
Thierry, I'm not sure there's much we can do on our side - from what I can see in your report, DWR doesn't know how to the handle the AOP case. Since we're creating proxies, it's only natural that the CGLIB classes are returned since this is their type.

Thierry Templier added a comment - 22/Jan/10 08:02 AM
Thanks very much for your answer, Costin. I agree with you! Using the getType method in this case doesn't seem to be suitable...