Win Yu

Ranch Hand
+ Follow
since Oct 17, 2001
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 Win Yu

can you tell us the name of J2EE patterns book?
I copied some EJB patterns from someone's note,only for your reference.
Patterns in J2EE
General.
• Bridge
Anything that provides a generic interface to a vendor specific product – JDBC, JMS, JNDI, JavaMail.
• Facade.
Anything that hides the complexity from the client – InitialContext, Connection, DataSource
Servlets / JSPs
• Decorator, Chain Of Responsibility
– Servlet 2.3 Filter
• Singleton - ServletContext, only one per application
JDBC
• Iterator – ResultSet
JNDI
• Iterator - NamingEnumeration, etc.
• Observer - EventContext.addNamingListener (.., NamingListener);
EJB
• Proxy, Facade - Remote interface
The stub and skeleton combined act as a proxy to a remote EJB object.
The stub and skeleton combined act as a facade – hides the networking details from the client.
• Abstract Factory - EJBHome
A client gets a reference to a home object which implements the EJBHome interface (analogous to
AbstractFactory). The client uses the home object to create an EJB object which implements EJBHome
(analogous to AbstractProduct).
N.B. with EJB the create methods only return a single Product so only one in the family
It’s tempting to say that the FactoryMethod is used in EJBHome but on balance it doesn’t quite match : the
container implementation of the EJBObject may defer creation to a subclass but it’s unlikely (create methods
are different for every EJB); the EJBObject adapts the bean class interface
• Decorator , Adapter - Remote interface
The container provides implementations for EJBHome and EJBObject. The implementations apply
transactions/security to methods before delegating the request to the bean class – e.g. create () checks if the
role is allowed to execute the method, if so bean.ejbCreate () is executed
• Facade - Session Facade (a single session bean method manipulates multiple entity beans)
• Memento - Value Objects, SFSB activation/passivation
• Command - transaction logging
• Flyweight - Instance pooling
A SLSB may contain intrinsic state (e.g. a socket connection). When a client uses a SLSB they pass in
extrinsic state (e.g. the parameters to the method call). Consequently, a small pool of objects can support a
large number of clients.
• Observer - EJB 2.0 MessageDrivenBean
• Interpreter - EJB 2.0 QL
• Template Method - EJB 2.0 CMP
Persistent fields / relationships declared as abstract methods in the bean class. The bean uses the
abstract/primitive methods in other methods. The container subclasses the bean class and implements the
abstract methods. When a client references the EJB object, they’re using the container sub-classed version.
JMS
• Mediator, Observer - Publish/Subscriber
The MOM acts as a Mediator between Colleagues, which in this case are the Subject(s) and Observer(s)
[ April 19, 2002: Message edited by: Win Yu ]
Protect domain is a new concept of java1.2,what is the relationship of protected domain and sandbox?
Home interface: factory
Remote interface: proxy
EJBObject: decorator
In objective about protocol:
"Select common firewall features that might interface with the normal operation of a given protocol"
can anyone expain this? any example?
thanks, but do you have the answers for those question?
congratulations. Hope you still be around here and answer my questions.
36. Is the SessionContedt and JNDI ENC available to the bean instance during ejbREmove() operation?
a. true
b. false
7. Which of the following is true about HTTP?
a. HTTP is stateless
b. HTTP maintains state information between requests
c. HTTP is connectionless
d. HTTP is connection oriented
2. Which of the following is not an optional step in establishing an SSL handshake?
a. Server side certificate validation by the client
b. client side certificate validation by the server
c. Generation of session keys for encryption and decryption
d. Selection of a suitable Cipher suite for encryption by the server and the client
hi finback, can you share you experience with us?
what books and materials did you read?