on ‎2007 Mar 23 2:35 PM
I'm wondering what the best way to structure my code is, in this context:
I have an EJB DC that utilizes some custom Java classes that need to be available to clients. For example, the business methods in the EJB may return instances of said custom code classes.
By default, the EJB DC contains a compilation public part called 'client', but you can't add any other entities to it, as you'll remove the default entity. I could manually create the entities in the public part, but I think when I add another EJB to the DC, it will overwrite the entities that I've created....either that, I'm messing with the default config, something I'm not interested in doing. In fact, this [page indicates that you should NOT alter the generated PPs:
http://help.sap.com/saphelp_nw2004s/helpdata/en/02/6755bd296ade42931646f869b1fd15/frameset.htm
So, what's the best way to handle this situation? I can create another public part, but that means that when someone wants to use the EJB's, they have to create two usage relationships - one to the EJB, and one to the PP that contains the helper classes. I think that this is the only way to do it, however.
How have other folks handled this common situation?
Request clarification before answering.
Hi Ken,
I think you've found it.
I'm not so sure about DC projects, but in the plain J2EE case I would recommend to put all common (public) classes in a separate component (application library) and make references to it both from the EJB application as well as from its clients. This library would also contain the EJB interfaces, so there would not be a need for direct reference from the clients to the EJB application.
I think with DC public parts you are achieving almost the same.
Cheers,
Vladimir
PS: BTW, probably you would be able to get more thoughts on this in the forum.
Message was edited by:
Vladimir Pavlov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.