Message Boards

how to use anntation Component and Referance in independand api-module

Scarletake Bwi, modified 2 Years ago.

how to use anntation Component and Referance in independand api-module

Expert Posts: 326 Join Date: 12/20/10 Recent Posts

hi

i create a independand api-module for other mvc-module to use.

i use 

MyComponent component =  new MyComponent();

it works, but it cannot auto-update if i modified it, i have to stop server, and delete temp of tomcat, and restart server.

 

i'd like use @Component in class of api-module, and use @Referance in mvc-module. via document OSGi Services and Dependency Injection with Declarative Services

but i got State:UNSATISFIED REFERENCE issue.

the eaziest way is i give up independand api-module, use service-builde module.

is there any other salution for my case to simple use?

 

Thank you in advance.