sivarajankumar / rocket-gwt

Automatically exported from code.google.com/p/rocket-gwt
0 stars 0 forks source link

aspects on rpc services don't work #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've defined beans as follows:

<rpc service-entry-point = "..." 
     service-interface = "...NavigationService"
     id = "navigationService"/>

<bean id = "securityInterceptor"
      class = "...ClientSecurityInterceptor"
      scope = "singleton">
</bean>

<aspect methods=".*" 
        advisor="securityInterceptor" 
        target="navigationService"/>

The compiler complained about a
[ERROR] Line 274:  The type NavigationServiceAsync cannot be the superclass
of navigationService__Proxy; a superclass must be a class

which is absolutly correct, since it had generated a class that /extends/
NavigationServiceAsync, but should instead just /implement/ it.

kind regards (and thanks for that great library),
Bertram

Original issue reported on code.google.com by bertram....@entega-service.de on 8 Jan 2008 at 2:26

GoogleCodeExporter commented 8 years ago
Thanx for pointing that out. 

Have you taken a stab at fixing the source, if so please post the change...

Otehrwise i will fix it..

Thanx again!

Original comment by miroslav...@gmail.com on 10 Jan 2008 at 3:01

GoogleCodeExporter commented 8 years ago
No, not yet, i'm sorry.

Original comment by bertram....@entega-service.de on 10 Jan 2008 at 7:24

GoogleCodeExporter commented 8 years ago
The fix was quite simple and pretty much did what you observed in the right spot
within BeanFactoryGenerator. 

    protected NewNestedType createProxy(final Bean bean) {
        Checker.notNull("parameter:bean", bean);

        final Type targetBeanType = bean.getType();
        final String id = bean.getId();

        // sub class the target...
        final NewConcreteType beanFactory = this.getBeanFactory();
        final NewNestedType proxy = beanFactory.newNestedType();
        proxy.setStatic(false);
        proxy.setNestedName(this.escapeBeanIdToBeClassNameSafe(id) + Constants.PROXY_SUFFIX);

        if( bean instanceof Rpc ){
            proxy.addInterface( targetBeanType );
        } else{
            proxy.setSuperType(targetBeanType);
        }
        proxy.setVisibility(Visibility.PRIVATE);

I will check in the updated files tonight ( i have also added a test to
BeansGwtTestCase).

Original comment by miroslav...@gmail.com on 10 Jan 2008 at 10:10

Attachments:

GoogleCodeExporter commented 8 years ago
Hey B*

I have added a contributors.txt file to the project and would like to add your 
name
for  your help in spotting and fixing issues like this one. Reply if you want 
to be
added.

Original comment by miroslav...@gmail.com on 22 Jan 2008 at 9:42

GoogleCodeExporter commented 8 years ago
Sure, I'd be pleased. :)

Original comment by bertram....@entega-service.de on 22 Jan 2008 at 12:30

GoogleCodeExporter commented 8 years ago
So whats your name...I cant get it by looking at your google profile :)

Original comment by miroslav...@gmail.com on 22 Jan 2008 at 8:30