on 08-26-2003 2:33 PM
Hi,
I am using another way of sharing external jars between applications - irj and other application that I deploy in the SAP J2EE Engine (like EJBs applications that provide my portal components data from SAP).
This way also seems to work fine (it is in production for at least a year for various portal components I created).
You can place your .jar files under SAP_J2EEngine6.20aloneadditional-lib
Then open the SAP_J2EEngine6.20alonemanagerslibrary.txt
Edit this file and add a library name like "myNewLib" that will reference your .jar files.
It should look like this:
library myNewLib myJarFile.jar
For example I have added this library:
library axis axis.jar;clutil.jar;commons-logging.jar;tt-bytecode.jar;jaxrpc.jar;log4j-core.jar;xerces.jar
Then open the SAP_J2EEEngine6.20alonemanagers eference.txt
edit the file and add a reference to your new library "myNewLib".
To add a reference to the portal components add that line for example:
reference irj library:myNewLib
after those changes you need to restart your engine.
No special definitions are required in the portal components.
I hope this helps someone...
Carmit.
Hi, can anyone tell me how did the program the ejb, what kind of IDE they used, and if they used the j2ee deploy tool, and if they tried to access a EJB from another client.
My main problem is this P4 prototcol. Because is I try to use the export client jar function I get some really strange functions.
If somebody has more experience in this, please help.
Thanks.
Best Regards Lucian.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick reply,
The fact is we want portal applications(par files) and ejb developed in the same but also in different environments. And then how can you have access to the Remote and the Home classes of the Ejb. What we want is an relatively easy way of doing this kind of work : portal applications that use EJb to do the business logic.
The problem when you develop this components in different environments is that you will need the classes, the client jar, and the jar file that you can get from the J2EE Administrator isn't standard.
So my problem should be resolved when I will have a fully working example that has a portal application that access a ejb and does something. I will need all the process from packing deploying the ear till the end...
Best Regards,
Lucian
This is very similar to what we are doing. We've developed the EJB to manage the data layer and business logic. Now we've referenced the EJB application from the portal and are developing it all via Eclipse. For class references, at development time we have two projects- one EJB project and one par project. The PAR project has a reference to the EJB project so it'll compile cleanly.
The sticky part is around deployment. You can use the SAP deploy tool- I'd go with the batch version so you can automate it in a build. We've done this, calling the deployer from an ant task.
This means that you use the Netweaver Developer Studio, because only that one from what i know has a J2EE part. But this one is intended for j2ee 6.30 or more, and the deploy part is for this version of the server.
And for referencing the ejb you use the procedure from the telnet ?
Anyway thanks, and maybe if you want you can send me a batch example with the deploy part.
And one more thing, you rely on the P4 or on the rmi protocol. Because the SAP J2EE uses P4 for clustering reasons, and we don't want to lose this capability.
Best Regards,
Lucian
No, we're using 6.2 and developing the BMP EJBs manually- just creating the home and remote interfaces and the bean class.
For the batch deploy, take a look at the examples in usr\sap\ep62\j2ee\j2ee_00\deploying\deploy_example. It is pretty basic, but seems to work. I've actually extended the class they are using so I could override some of the xml params and push them into an ant task. It is basically the same though.
You said this "Now we've referenced the EJB application from the portal and are developing it all via Eclipse. For class references, at development time we have two projects- one EJB project and one par project. The PAR project has a reference to the EJB project so it'll compile cleanly." And you said that you used Eclipse, so this is why I said like that about NetWeaver Developer Studio.
Anyway thanks so much,
Best Regards,
Lucian,
I'm trying to use EJB's on 6.2 within the portal. I've got my EJB's created and deployed. Further, I've copied the ejb jar file to the additional-lib directory, added my referece.txt and library.txt entries.
However, when I deploy a portal component that references a class in the EJB jar file, I get a NoClassDefFoundError. I've tried several variations in the SharingReference (ie using the name from reference.txt), but it doesn't seem to make a difference.
What am I missing?? Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay, I've finally got it working. For anyone interested...
1. Create your EJB
2. Deploy EJB(s) using the deploy tool
3. use the J2EE console to create the reference between irj and your EJB app
3a. telnet localhost 50008
3b. JUMP to your server
3c. ADD DEPLOY
3d. LISTAPP shows all applications on the cluster
3e. LL shows all references
3f. CHANGEREF -m IRJ application:[ejbApp]
Then, restart. You can then access your EJB's and it's supporting classes from an iView. Also, if you've got another web application, you can link it (instead of IRJ) the same way.
thanx.
a good comparison between J2EE and portal services. But it does not mean, that you should always prefer J2EE services ;-).
Oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.