Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Thambi Rajah

Ranch Hand
+ Follow
since Jul 19, 2002
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 Thambi Rajah

Thanks to Anthony Watson for your suggestion.
When I read the HFEJB book (pg. 91), I had the impression that the Container will always create a single instance of RuleHome object. However, when Rule1 class invokes the execute( ) method of Rule2, I believe that the Container will create two RuleHome instances rather than one.
Would anybody confirm exactly how many RuleHome objects are created in this situation?
Thanks in advance,
Thambi
Thanks for your reply. Unfortunately, I cannot pass the SessionContext object as reference to every rule.
As is, how many home objects are created in this situation?
Thanks in advance
Thambi
I have the following situation.
RuleBean is a stateless session bean which calls Rule classes such as Rule1, Rule2..... etc where Rule1 and Rule2 are Java classes having only one method, execute( ). A client gets a home reference of RuleHome, home1, through a JNDI lookup. Using home1, the client gets a remote reference, rref1 and invokes runRule( ) method in RuleBean. The method runRule( ) gets a refernce (rule1) to Rule1 class and invokes the rule1.execute( ) method:

In execute ( ) method of Rule1, it needs to run another rule, Rule2. It needs another JNDI lookup for RuleHome, home2, and eventually invokes the rule2.execute( ) method.

My Question is:
Is there any way we can get rref2 from a single RuleHome reference, home1?
OR
should we always need two RuleHome references, home1 and home2, in this situation?
Thanks in advance,
Thambi
I have the following problem to be solved. Your response is appreciated.

There are two beans, BeanA and BeanB, and a class ClassC. The BeanA has a method fooA(), and BeanB has a method fooB().
In Deployment Descriptor, the methods fooA and fooB are declared required. The Client calls the method fooA() which in turn calls the method
fooB(). The method fooB() calls a method execute() in ClassC, which is not a bean. The execute() method does an update on a DataBase.
My question is whether the execute() method is part of the transaction that BeanA starts with?
Thanks in advance.
Thambi
Hello Ranchers,
I like to know whether filter-name element can have space(Secure Name)as below:

Thanks in advance,
Thambi
17 years ago
JSP
Sorry, last posting did not work well. I repeat..
Hello Ranchers,
Thanks for all of your input.
Can we summarize our discussion in the following way to confirm that the EJBHome is a
Factory Method pattern? Please feel free to correct me if I am wrong.
Summary
EJBHome qualifies to be a Factory Method pattern. As we follow the conventions in GoF Book,
the follwing classes/interfaces take the corresponding roles:
class/interface --------> GoF Convention(pg 108)
EJBHome(interface) --------> Creator
MyBean_HomeImpl(class) -------->ConcreteCreator
EJBObject(interface) --------> Product
MyBean_Impl(class) --------> ConcreteProduct
where MyBean_HomeImpl, MyBean_Impl classes are arbitrary names, and are generated by EJBContainer.
These names vary from one vendor to another.
When a Client invokes create() method using EJBHome reference, home:

the corresponding factory method create() in MyBean_HomeImpl is invoked, and MyBean_HomeImpl
instantiates an instance of MyBean_Impl class. Therefore, remote_ref points to the instance of
MyBean_Impl.
Having brought EJBHome, EJBObject, MyBean_HomeImpl, MyBean_Impl interfaces/classes into the Structure,
how do we bring the Bean class(class implemented by the Developer)into the Struture? The proxy pattern comes in this
regard in the following way:
class/interface --------> GoF Convention(pg 209)
EJBObject(interface)--------> Subject
MyBean_Impl(class) --------> Proxy
MyBean(Bean class) --------> RealSubject
When a Client invokes a business method, getFirstName(), using remote reference, remote_ref:

MyBean_Impl invokes the method implementation of getFirstName() in MyBean class
Thank You
Thambi
Hello Ranchers,
Thanks for all of your input.
Can we summarize our discussion in the following way to confirm that the EJBHome is a
Factory Method pattern? Please feel free to correct me if I am wrong.
Summary
-------
EJBHome qualifies to be a Factory Method pattern. As we follow the conventions in GoF Book, the follwing classes/interfaces take the corresponding roles:
class/interface GoF Convention(pg 108)
--------------- ----------------------
EJBHome(interface) Creator
MyBean_HomeImpl(class) ConcreteCreator
EJBObject(interface) Product
MyBean_Impl(class) ConcreteProduct
where MyBean_HomeImpl, MyBean_Impl classes are arbitrary names, and are generated by EJBContainer. These names vary from one vendor to another.
When a Client invokes create() method using EJBHome reference, home:

the corresponding factory method create() in MyBean_HomeImpl is invoked, and MyBean_HomeImpl
instantiates an instance of MyBean_Impl class. Therefore, remote_ref points to the instance of
MyBean_Impl.
Having brought EJBHome, EJBObject, MyBean_HomeImpl, MyBean_Impl interfaces/classes into the Structure, how do we bring the Bean class(class implemented by the Developer)into the Struture? The proxy pattern comes in this
regard in the following way:
class/interface GoF Convention(pg 209)
--------------- ----------------------
EJBObject(interface) Subject
MyBean_Impl(class) Proxy
MyBean(Bean class) RealSubject
When a Client invokes a business method, getFirstName(), using remote reference, remote_ref:

MyBean_Impl invokes the method implementation of getFirstName() in MyBean class.
Thank You
Thambi
Thank you Lasse Koskela for your input.


Originally posted by Lasse Koskela:
I'd say that if the EJBHome interface is GOF's Creator, then the ConcreteCreator would be the implementation class generated by the EJB container.


Your argument makes me believe that EJBHome is a Factory Method pattern. I can see the classes
Creator, ConcreteCreator and Product fit into Factory Method pattern. I wonder what the ConcreteProduct class would be? Would it be the Bean class implemented by the developer or would it be a class generated by the EJB container?
Thanks in advance
Thambi
Thank you Nilesh Pereira for your prompt replies. I was clear from your first reply, but I got little confused with your second reply.


"Define an interface for creating an object, but let subclasses decide which class to instantiate."
Based on this intent, I don't see how EJBHome qualifies as a FactoryMethod. Or am I missing something?


Assume EJBHome qualifies to be a FactoryMethod pattern. In this case, is EJBHome a Creator class/interface? What is the ConcreteCreator class in this case? I understand that the Product interface is EJBObject. What would be the ConcreteProduct class ?
The Creator, ConcreteCreator, Product , ConcreteProduct are the conventions used by GoF book on pg 108.
Thanks in advance
Thambi
I plan to buy this book and read on summer.
I hope that I could win it for free.
Thambi
17 years ago
JSP
Hello Ranchers,
I have been trying to figure out which pattern EJBHome interface will fall into. When I did a search on the forum, I came across the following thread which argues the EJBHome as a Factory Method pattern. I wonder how the EJBHome qualifies as a Factory Method pattern.
Click here
A detailed explanation is greatly appreciated
Thambi
I used WebLogic 6.1 as Evaluation Product for one month and my license has just expired.
I like to extend my license for further usage.
I heard that BEA offers Evaluation Product for one year now. If so, would you let me know
which product version is being offered for one year license?
Thank You
Thambi
17 years ago
Hello Ranchers,
I need to use Struts Framework with WebLogic.
I am comfortable with WebLogic 6.1. I looked for BEA documentation of WebLogic 6.1
for Struts Framework, but I could not find any information. If any fellow ranchers used
Struts Framework with WebLogic, could you let me know which version of WebLogic I need to use and where I find the documentation.
Thank You
Thambi
17 years ago
Hello,
I am new to BEA WebLogic 6.1. I want to familiarize with WebLogic 6.1 Server for deploying Enterprise JavaBeans, using WebLogic Admin Console. Is there any good book which could guide me step-by-step procedure instead of reading through many pages of WebLogic Adminstration Guide or WebLogic Admin Console?
Thanks,
Thambi
17 years ago
Book Title : SCWCD Exam Study Kit
Authors: Hanumant Deshmukh and Jignesh Malavia
publishers: Manning
ISBN: 1-930110-59-6
As suggested, you could search using any of the above fields on www.amazon.com.
Good Luck,
Thambi