This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hooks and Handlers

 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can we add Hooks and Handlers functionality to EJB Components?So that the behavior of EJB methods can be customized as per the customer requirements?
Rgds
Muthu
 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I struck with an idea and did a simple test also. Works fine !!! Please lemme know whether this is valid.
1. Define a Hook XML File
2. Define a Hook Class containing the customization code
3. Have the Hook Parsing logic embedded in the partial Business Class
4. Extend the partial business class to implement actual deployable
business class.
Hook Characteristics:
1. Behaves like Aspect Oriented Programming
2. Handles Arguments of the methods
3. Could be invoked before / after the core portion of a given method is executed depending upon the hook configuration.
Sample Hook XML File:
<?xml version="1.0"?>
<class name="test.LoadClass">
<method invoke="PRE" name="doChangedPrinting"/>
</class>
Rgds
Muthu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!