Sujay Kamble

Greenhorn
+ Follow
since Feb 23, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sujay Kamble

Hi All,
I have a jar file named A.jar. This A.jar contains a java class Trial.class, Manifest.mf and B.jar. Trial.class uses the B.jar file. How should i set the path of B.jar file in Manifest.mf.

As expected, if i keep B.jar file in the same directory as A.jar and give "CLASS-PATH: B.jar" in Manifest.mf, then it works. But i want to include this B.jar file in A.jar file.

Please help me solve this problem.

Sujay
19 years ago
Hello,
I have a jar file named A.jar. This A.jar contains a java class Trial.class, Manifest.mf and B.jar. Trial.class uses the B.jar file. How should i set the path of B.jar file in Manifest.mf.

As expected, if i keep B.jar file in the same directory as A.jar and give "CLASS-PATH: B.jar" in Manifest.mf, then it works. But i want to include this B.jar file in A.jar file.

Please help me solve this problem.

Sujay
So, there is an EJB deployed on Weblogic server and there are 1000 clients who are using this EJB. Each one of this client will have a Client Jar file generated by Weblogic and each of this client was compiled with this Weblogic's Client Jar file.
Tommorrow if this same EJB is deployed in Websphere, a new Client Jar file generated by Websphere(which will have different stub classes files bcos the name of the stub classes itself can be different) will have to be sent to all these 1000 clients and all the clients need to be recompiled (since the stub class files are needed at compile time).
So every time the EJB container changes, all clients need to be recompiled with new Client jar file having new stub classes.
Oh no....I hate EJB bcos clients depend on the server. Write once Deploy anywhere and recompile all ur clients with new Stub class files.
But why can't the stub class files be downloaded dynamically at runtime as stated in Ed Roman EJB1.0 (not the new EdRoman for EJB2.0) in the chapter on Java RMI(section ownloadable implementations)? If that were the case the client would only require the 2 Interface class files for compilation and won't depend on any server.
As stated in HFE (Page 51), the client needs the Client Jar file (generated by the container) which contains the Remote and Home interafces and also the Home and Remote(i.e HomeObject and EJBObject) stubs!!!
1. But why does the client need the 2 stubs during compilation???
(HFE pg 57.....AdviceAppClient.jar for compliling client)
2. Aren't the 2 interfaces enough???
3. If the Home stub is already present in Client Jar , why to do a lookup for the HomeObject stub???
4. If the EJBObject stub is already present in Client Jar then why is it stated everywhere (HFE Pg 179, 193, etc) that the HomeObject on server returns the EJBObject stub???
I used to think that these 2 stubs are downloaded dynamically on the client machine at runtime and the only thing the client needs for compilation are the 2 interfaces.
In Headfirst EJB on Page 228 , its mentioned that u can use the sessionContext.getEJBObject() in the ejbCreate method of a stateless session bean.
But a stateless session bean is linked to its EJBObject only when a client invokes a business method on the remote interface (HeadFirst Page 226 point #2).
Then how is it possible to get a reference to the EJBObject in the ejbCreate of a stateless session bean.
Sujay.