on 01-31-2007 10:33 AM
Dear all,
is it possible to let Developer studio create the code for calling an ejb automatically?
the following code is actually always the same and it's not practical to type that code over and over again every time we want to call a method on an EJB...
InitialContext ctx = new InitialContext();
TestEJBLocalHome localHome = (TestEJBLocalHome)ctx.lookup("localejbs/TestEJBBean");
TestEJBLocal bean = localHome.create();
So it would be nice if there was a way to say to developer studio, this is the bean i want to use, please generate the code so i can call my method on it.
Kind regards,
J.
Joren,
Almost exactly what you need:
1. In NW IDE open Window -> Preferences
2. Navigate to Java -> Editor -> Templates
Got the idea?
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joren,
What ur asking is specific to one EJB and in real time u don't make use of the same EJB always. as per my knowledge there is no option from sap IDE ,
but you can edit the default comments and put these statements for java class
creation. but it is not good programing practice
Regards
PP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Thx for the replies. I know its not always the same EJB that will be used, but it would be a nice feature in the developer studio ( @ design time ) that one could generate the code from a specific EJB. NWDS would know the specific data then, because the EJB to create the code for is selected...
Kind regards,
J.
Hi Joren,
No, there is no short cut to generate these three lines of code.
You will have to type in these three lines..
If u find some method to get the lines pls. do inform me.
Thanx & Regards.
Alka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.