Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

injvm and local call #3638

Closed
beiwei30 opened this issue Mar 12, 2019 · 5 comments
Closed

injvm and local call #3638

beiwei30 opened this issue Mar 12, 2019 · 5 comments
Labels
type/bug Bugs to being fixed
Milestone

Comments

@beiwei30
Copy link
Member

injvm protocol doesn't work well with scope.

injvm should not be registered to register center

<dubbo:protocol name="injvm"/>
<bean id="target" class="org.apache.dubbo.samples.provider.GreetingsServiceImpl"/>
<dubbo:service interface="org.apache.dubbo.samples.api.GreetingsService" ref="target" protocol="injvm"/>

injvm url is registered

local call doesn't work when protocol is injvm

The following configuration is supposed to work but dubbo complains no provider found from registry center.

<dubbo:protocol name="injvm"/>
<bean id="target" class="org.apache.dubbo.samples.provider.GreetingsServiceImpl"/>
<dubbo:service interface="org.apache.dubbo.samples.api.GreetingsService" ref="target" scope="local" protocol="injvm"/>
<dubbo:reference id="demoService" interface="org.apache.dubbo.samples.api.GreetingsService" scope="local"/>
@zonghaishang zonghaishang added the type/bug Bugs to being fixed label Mar 12, 2019
@lkj41110
Copy link
Contributor

lkj41110 commented Apr 9, 2019

I try to reproduce the problem with your config, but it fails.

@Leishunyu
Copy link
Contributor

I reproduced your problem and made changes to the injvm export.Will submit a pr fix this bug in the near future

@beiwei30 beiwei30 added this to the 2.7.2 milestone Apr 30, 2019
@cvictory
Copy link
Contributor

cvictory commented May 6, 2019

I am not sure what is the best way to fix this issue.

In a real scene, I think we will use :

@Autowired
private GreetingsService target;
// remove this configuration
//<dubbo:reference id="demoService" interface="org.apache.dubbo.samples.api.GreetingsService" //scope="local"/>

instead of:

@Autowired
private GreetingsService demoService;


<dubbo:reference id="demoService" interface="org.apache.dubbo.samples.api.GreetingsService" scope="local"/>

@cvictory
Copy link
Contributor

cvictory commented May 6, 2019

This modification increase some complex logic and I suggest we donot fix this issue.

@beiwei30
Copy link
Member Author

beiwei30 commented May 6, 2019

I merged #3857 since it does solve the two problems I reported. Later we can consider removing 'injvm' and 'scope' from user's configuration entirely.

@beiwei30 beiwei30 closed this as completed May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

5 participants