This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[5.5rc1] -have 1.5 ejb module w/ local session bean -create new websvc from existing EJB => generated ws class should contain @EJB private <ejbName>Local <someName> field, but it contains lookup method
Radko, could you please investigate how difficult would be to generate @EJB injection instead of lookup method. Note: we should generate @EJB injection only in JAVA EE 5 projects.
Why is the described behavior a serious bug? Shouldn't things work even if you use lookup? I agree injection would be better, but is it crucial?
-because this had been working few week ago (@EJB... had been generated correctly) -lookup would work correctly only if there will be associated ejb-ref entry in ejb-jar.xml - because there's no DD => no entry in DD => lookup does not work or if there will be correct jndi name used in lookup method
> -because this had been working few week ago (@EJB... had been generated correctly) Are you sure? Who implemented it? As far as I know lookup was always generated. So I was surprised why this was reported now when nobody had problems with it in previous months?
> Are you sure? Ooops, no. I've just checked Beta and Beta 2 and there it is not working too :( > Who implemented it? You in late april if I remember correctly. We discussed this personally that time. I'll try find it in issuezilla.
Issue 73996 is related to this one.
Ok, I see. Now I agree this is serious.
>> Who implemented it? > >You in late april if I remember correctly. Yes, I did it but it was done by the lookup, not that way which is requested now. So my question was related to your comment that it was working. It is clear now when you agreed that it had never worked by that way.
Created attachment 35076 [details] proposed patch
Martine check the attached proposed patch too, please. One thing which is probably not resolved there is the case when JavaClass passed to WSInjectiontargetQueryImpl.isInjectionTarget() will contain two "WebService" annotations (eg. a.b.WebService and javax.jws.WebService)
I agree with the patch but there must be P3 filed against WS generation - some refactoring is needed in order to use InjectionTargetQuery based on model (it means that WS must be already in model when it is trying add call to EJB)
I've filed issue 86853 for that.
Proposed patch applied in release55_dev. Checking in WSInjectiontargetQueryImplementation.java; /cvs/websvc/core/src/org/netbeans/modules/websvc/core/Attic/WSInjectiontargetQueryImplementation.java,v <-- WSInjectiontargetQueryImplementation.java new revision: 1.1.2.3.14.2; previous revision: 1.1.2.3.14.1 done
v. in 20061010-1315, I've check following scenarios: -ws from ejb in ejb module 1.5, 1.4 -call ejb in ws impl class in ejb/web 1.4/1.5 projects -call ejb in provider ws (ws from wsdl and then checking appropriate checkbox in wsdl customization editor) In all these cases it is working as expected. Please merge the fix also to release55 branch
Fixed in release55 branch. Checking in WSInjectiontargetQueryImplementation.java; /cvs/websvc/core/src/org/netbeans/modules/websvc/core/Attic/WSInjectiontargetQueryImplementation.java,v <-- WSInjectiontargetQueryImplementation.java new revision: 1.1.2.4; previous revision: 1.1.2.3 done
v. in release55 branch