This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Dear Jabber,
Could you please give me a hand?(also about EJB)This time I face the problem about calling methods between EJBs. For example, if there are two beans, how to call the method of bean A from bean B. I know the getEJBObject( ) method is useful under such condition. But how to pass a reference to the second bean and is it necessary to call method by Home Interface just regarding the first bean as a client?
Furthermoe, if the two beans are in different containers, is the solution the same?
-linoopy(snoopy);
2000-12-2
{444}
(#16815@0)
-
The first Bean is the second Bean's client.So you need use EJB client API and JNDI. Get the remote interface first.....
By the way, getEJBObject() does not help you much. EJBObject is an interface...
The same procedure applies if the two beans are in the different containers.
-jabber(jabber);
2000-12-2
{240}
(#16870@0)
-
Thanks for your guidance! And could you please tell me is it feasible for an entity bean to embody many tables, not just one bean, one table?
-linoopy(snoopy);
2000-12-2
(#16876@0)
-
It is challeging to make an EntityBean is associated with a row in a view....I suggest you download EJB speficiation from sun's site. In the development, there are a lot of headaches.
-jabber(jabber);
2000-12-2
{108}
(#16882@0)
-
Thanks! I have downloaded the specification. However...after inputting "tables" or "row" into the FIND FUNCTION, I don't get what I want. Could you please explain it detailedly what's the meaning of "a row in a view" in your answer?
Now I am a little bit confused about the method of studying EJB. You know, the specification have 558 pages and another EJB book I have been reading have 738 pages. I don't know exactly when I will finish reading so many pages and when I will write codes for the project?
It's really a tough winter!
-linoopy(snoopy);
2000-12-3
{495}
(#16993@0)
-
EntityBean ususally persist to a Table in a DB.
-jabber(jabber);
2000-12-4
{769}
(#17074@0)
-
Thanks a lot!!! You are right that...I have learned something about EJB recently but do lack of practical experience. My plan is to understand the essential of EJB first and then do it by myself.
The IDE I use is JBuilder 4.0 and back-end database is Oracle 8. There are several good examples in JBuilder. I will research them and thank you for your kindness again!
-linoopy(snoopy);
2000-12-4
{332}
(#17113@0)