Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368737 - Allow adopters to add @Remote and @Local annotations to EJB class when creating a session EJB
Summary: Allow adopters to add @Remote and @Local annotations to EJB class when creati...
Status: RESOLVED FIXED
Alias: None
Product: WTP EJB Tools
Classification: WebTools
Component: jst.ejb (show other bugs)
Version: 3.2.5P   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2.5 P   Edit
Assignee: Roberto Sanchez Herrera CLA
QA Contact: Kaloyan Raev CLA
URL:
Whiteboard:
Keywords:
Depends on: 366346
Blocks: 368749
  Show dependency tree
 
Reported: 2012-01-16 11:37 EST by Roberto Sanchez Herrera CLA
Modified: 2012-01-20 12:35 EST (History)
3 users (show)

See Also:
cbridgha: review+


Attachments
Proposed patch for 3.2.5 P (29.54 KB, patch)
2012-01-16 11:39 EST, Roberto Sanchez Herrera CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Sanchez Herrera CLA 2012-01-16 11:37:14 EST
Bug for backporting this code to WTP 3.2.5 P

+++ This bug was initially created as a clone of Bug #366346 +++

Currently, when you create a session EJB with local and/or remote view and you do not implement any other interface, the remote and/or local interfaces are created with the proper annotation (@remote or @local), and the resulting bean only implements these interfaces. But if you implement an extra interface in the wizard, the resulting bean class will have the @Remote and/or @Local annotation as well, 

This enhancement proposes to change this behavior by default, or provide a way to change this behavior, to add to the bean class the @remote and @local annotations besides implementing the interfaces even when you do not implement an extra interface, something like this:

/**
 * Session Bean implementation class MyBean
 */
@Stateless
@LocalBean
@Remote({com.test.MyBeanRemote.class})
@Local({com.test.MyBeanLocal.class})
public class MyBean implements MyBeanRemote, MyBeanLocal {
.....
}

The benefit to placing then annotations on the bean class is that it's clear what the business interfaces of an EJB are. Besides, this would help developers if they change their mind later and they want to implement an extra interface in their beans, or if they later want to add an extra remote/local business interface. This could also tools and application servers.
Comment 1 Roberto Sanchez Herrera CLA 2012-01-16 11:39:50 EST
Created attachment 209563 [details]
Proposed patch for 3.2.5 P
Comment 2 Chuck Bridgham CLA 2012-01-16 13:18:46 EST
approve
Comment 3 Roberto Sanchez Herrera CLA 2012-01-20 12:35:58 EST
Code committed and released to R3_2_5_patches. Resolving bug.