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.

Bug 86767 - Wrong ws impl class when creating ws from ejb
Summary: Wrong ws impl class when creating ws from ejb
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Radko Najman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-09 13:39 UTC by Lukas Jungmann
Modified: 2006-10-11 14:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (2.52 KB, text/plain)
2006-10-10 12:20 UTC, Lukas Jungmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2006-10-09 13:39:42 UTC
[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
Comment 1 Milan Kuchtiak 2006-10-09 14:13:55 UTC
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.
Comment 2 Petr Jiricka 2006-10-09 14:31:52 UTC
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?
Comment 3 Lukas Jungmann 2006-10-09 14:55:48 UTC
-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
Comment 4 Radko Najman 2006-10-09 15:33:09 UTC
> -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?
Comment 5 Lukas Jungmann 2006-10-09 16:32:39 UTC
> 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.
Comment 6 Lukas Jungmann 2006-10-09 16:50:30 UTC
Issue 73996 is related to this one.
Comment 7 Petr Jiricka 2006-10-09 17:17:30 UTC
Ok, I see. Now I agree this is serious.
Comment 8 Radko Najman 2006-10-10 08:50:23 UTC
>> 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.
Comment 9 Lukas Jungmann 2006-10-10 12:20:06 UTC
Created attachment 35076 [details]
proposed patch
Comment 10 Lukas Jungmann 2006-10-10 12:39:04 UTC
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)
Comment 11 Martin Adamek 2006-10-10 13:31:01 UTC
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)
Comment 12 Lukas Jungmann 2006-10-10 13:36:03 UTC
I've filed issue 86853 for that.
Comment 13 Radko Najman 2006-10-10 14:15:27 UTC
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
Comment 14 Lukas Jungmann 2006-10-10 15:12:54 UTC
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
Comment 15 Radko Najman 2006-10-11 08:49:23 UTC
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
Comment 16 Lukas Jungmann 2006-10-11 14:44:54 UTC
v. in release55 branch