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 249182 - Generated testcase for REST endpoint uses deprecated class
Summary: Generated testcase for REST endpoint uses deprecated class
Status: RESOLVED INCOMPLETE
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 8.0.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-08 02:27 UTC by arungupta
Modified: 2015-06-02 09:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arungupta 2014-12-08 02:27:46 UTC
Generating a new test for JAX-RS resource in Java EE 7 project. Generated code looks like:

        System.out.println("edit");
        Object id = null;
        EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
        MovieFacadeREST instance = (MovieFacadeREST)container.getContext().lookup("java:global/classes/MovieFacadeREST");
        instance.edit(id);
        container.close();


EJBContainer is deprecated in Java EE 7 and the code should be updated accordingly. For example, this code will fail in WildFly.
Comment 1 Tomas Mysik 2015-05-28 10:26:49 UTC
Honzo, could you please have a look at this issue? Thanks.
Comment 2 Jan Stola 2015-06-02 09:45:49 UTC
> EJBContainer is deprecated in Java EE 7 and the code should be updated
> accordingly. For example, this code will fail in WildFly.

Could you, please, provide more details? I am not an expert in this area and I don't seen any deprecation warning in JavaDoc:
https://docs.oracle.com/javaee/7/api/javax/ejb/embeddable/EJBContainer.html