File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes EJB3 remote/local interface generating tool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB3 remote/local interface generating tool" Watch "EJB3 remote/local interface generating tool" New topic

EJB3 remote/local interface generating tool

Andreas Wier

Joined: Jul 20, 2007
Posts: 3

Is there a good tool for generating remote and local interfaces for EJB3 session beans. I only want to code the bean by itself.

And if I don't need a tool, how can I do this?

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Welcome to JavaRanch

In EJB3 the remote and local interfaces are nothing but simple Java interfaces. They just have your application's business method signatures. You dont need any tool to do that. A sample interface might look like:

As you can see there's nothing that needs to be auto-generated here.

[My Blog] [JavaRanch Journal]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

If you already have the implementation class, most IDEs are able to perform the "extract interface" refactoring to automatically create an interface for a class.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Andreas Wier

Joined: Jul 20, 2007
Posts: 3

For now we are using EJB2.1 and XDoclet/Ant to generate all the Interfaces for the EJBs. And we want switch to EJB3. And in the future, we want also to have these interfaces generated. So that not all the application developers have to code the interfaces by themself. And because we are working on a very big project with many many EJBs, we want a tool to generate it.

We would be pleased, if somebody knows a tool to generate these remote/local interfaces for EJB3 session beans like with xdoclet for EJB2.1

Sergio Barreros

Joined: Sep 09, 2003
Posts: 21
Does anybody know how to auto-generate and update the interfaces in EJB3 like in EJB2 with xdoclet?
I have been using EASYECLIPSE, but I can't find an easy way to keep my interfaces updated like I used to in EJB2 where it was merely a matter of running the xdoclet tool and voila, your interfaces signatures were updated to reflect your bean.

I have tried using the Refactor tool in Eclipse, but it is not very productive, like it will create a new signature if you update the signature of the bean and it is very quirky.

Thanks for any help
Andreas Wier

Joined: Jul 20, 2007
Posts: 3
We found a solution using ANT to generate REMOTE and LOCAL Interfaces.

We are using the Tool APT Jelly with the following script:

The script should also generate Generic declarations.


Constantine Pinakoulakis

Joined: Dec 05, 2003
Posts: 3

We would also like to use Ant/Jelly or Maven/Jelly to auto-generate EJB 3.0 interfaces, etc.

We have found some information on Jelly and APT-Jelly, but no documentation on the relevant Ant task or Maven plugin (i.e. how to invoke Jelly from Ant or Maven).

Any information would be very helpful.


I agree. Here's the link:
subject: EJB3 remote/local interface generating tool
jQuery in Action, 3rd edition