Take the 2-minute tour ×

I am using WAS application server and EJB 3. I need to generate stubs for my EJBs . Is there any ANT task to generate EJB 3 stubs ?

I know createEJBStubs can be used, but it would be grateful If i can use ANT task.


share|improve this question
I heard there is a way by which we can generate stubs using websphere ant task. But i did not find anything. Any comments or direction is appreciable. –  Mayur Sharma Sep 30 '13 at 8:24
add comment

1 Answer

up vote 2 down vote accepted

Based on this faq page, when websphere is generating the stubs using an ant task, it is actually calling createEJBStubs:

<exec executable="${was.home}/bin/createEJBStubs.${suffix}">

So that's probably what you should do as well.

(It is peculiar that EJB stubs would be needed for EJB 3.0, as that's supposed to eliminate the need. However, it seems that with websphere, you still have to generate them)

share|improve this answer
You need to generate the stubs in case you need to create a standalone client, i.e. an EJB client that does not run in an application server. In case your client does run in an application server then you do not need to carry the stubs. –  trikelef Oct 1 '13 at 8:33
+1 to @trikelef , we need stubs if we are running stand-alone client. I just need to confirm that is there any other way to generate stub rather than calling this executable? –  Mayur Sharma Oct 1 '13 at 8:59
The faq page cited by @eis gives you an ANT script that does the job –  trikelef Oct 1 '13 at 9:02
@trikelef : that script internally calls createEJBStubs.sh (or .exe). I think there is no other way to generate stubs. Thanks trikelef and eis for discussing with me. –  Mayur Sharma Oct 1 '13 at 9:37
add comment

Your Answer


