Page 6 of 6
As for application security, the client, which starts the scheduler, should first obtain authorization, implemented through either declarative or programmatic authorization. It is worthwhile to mention that you're starting a multithreaded process here; however, you're not creating a concurrent threads situation because of the thread scheduler's algorithm.

Figure 7. The Scheduler
You want to automate your integration process and the integration business rule described in a text script, so that each B2BTaskHandler can consult with the Integration Rule Engine about how to conduct the actual tasks, and nonprogrammers can modify the rules.
When and how do you use a rule engine to help develop a more flexible integration solution?
You can pick from several options for embedding a rule engine in J2EE-based systems. JESS (Java Expert System Shell) allows
rules to access any JavaBean's get or set methods as simple property values (see Resources).
In E++, I suggest you load a rule engine with RuleEngineController, which provides you with a RuleEngine instance, rule parser, and fact-assert functionality. The RuleEngine can be implemented as a stateless session EJB so that the container can handle any security issues. You define specific business
rules in clp script. Each B2Bhandler uses one rule engine instance to fulfill its task. Therefore, you can define your working memory element (WME) to resolve
conflict set (CS). The UML diagram is also shown in Figure 7.
You want to design a remote service dispatcher so that B2BTaskHandler can get services from it without being bound in any specific service implementation.
How do you design a dispatcher that dynamically loads or removes available remote services?
Even if the B2BTaskHandler or RuleEngine want specific remote services, they shouldn't need to know the services' locations. In case of any service failure or network
problem, you could change the services dynamically.
The Dispatcher component acts as an intermediate layer between B2BTaskHandler and services. The Dispatcher implements a unique service name so the handlers can refer to services by a simple string name instead of their implementation
details. The handlers rely on the Dispatcher to locate a particular service; the Dispatcher's registration maintains all the available services. As another benefit, Dispatcher provides methods so the administrator can add or remove services dynamically. One could think of having a daemon process
running against the Dispatcher to update the list of available services.
The Dispatcher's UML diagram is shown in Figure 7.
According to your business requirements, to communicate with backend services you need to use an XML schema to define your messaging.
Should you define your own XML schema?
XML's real strength will become apparent as more industries agree on standard schemas. However, due to competition concerns, numerous companies continue to define proprietary XML schemas. Moreover, XML does not define how information content should be structured. As a result, you'll face difficulties when dealing with business integration.
Because DTD schema design requires effort, in an ideal world you could adopt a well-accepted schema as your own. (I've provided links to preconstructed e-commerce schemas in Resources.)
If you cannot find a predefined schema to fit your needs, you'll have to develop one yourself. In that case, consider these points:
order.xml in the TSP case from Part 1. To me, designing a good XML DTD is similar to designing a Java object. An order.xml attribute acts just like a private attribute in an Order.java object, such as orderId. The Order.java object contains several objects, such as credit card, billing address, order date -- these should be elements.You understand that to secure your communications with your business partners, you must address security.
TCP connections are subject to eavesdropping, spoofing, masquerading, false packet insertion, and packet modification. What level of security do you need to build trusted relationship with your business partners?
Your potential integration partners will be either within the same large organization or over the Internet, so you must address all possible scenarios to secure the remote method invocations or messaging communication.
Recent cryptography technologies can make your Internet communication acceptably secure. You can choose from several well-accepted security standards:
IP layer. This new standard is based on Virtual Private Networks (VPN), primarily used to secure a large organization with multiple Internet sites. Within a large organization, a VPN could provide acceptable communication security, provided repudiation is not an issue.
The dispatcher needs to register the related remote services, which have nonobject-oriented APIs.
How do you deal with a large number of nonobject-oriented applications?
You don't want nonobject-oriented applications to ripple through your carefully constructed distributed architecture, especially if that architecture must change and evolve over time.
You should avoid directly converting nonobject-oriented functionality. Instead, for each set of related functions and data, create one or more wrapper facade classes to encapsulate these functions in more concise, robust, and maintainable methods. Let the dispatcher register these wrapper facade classes. Examine the Remote Wrapper Facade's UML diagram in Figure 8.

Figure 8. The Remote Wrapper Facade
The dispatcher must register all the related remote services, which have object-oriented APIs.
It is inappropriate to register the remote services directly; you do not want to hardcode their physical locations and protocols. To the dispatcher, the remote services should be simple and transparent.
The remote access implementations should be runtime-efficient, cost-effective, and smart.
By leveraging your business domain knowledge and rule engine, your proxies can provide some intelligence to improve your application
performance, load balancing, and cache information to improve access performance. In other words, you may put some business
domain knowledge through ruleEngineController to turn the Proxy Adapter into smart adapters. In general, it's here where developers can improve application performance or security.
Your integrated business entities reside on remote computers. You need a strategy to connect them. You want to lower the integration surprise as much as possible.
How can you ensure a seamless evolution from prototype to real implementation?
When integrating remote business entities, you must ensure that:
If you want to guarantee a seamless evolution from prototype to reality, you'll benefit from maintaining two coexisting implementations for any remote entity. Your prototype simulations provide required integration functionalities at the development phase without interrupting the existing operations, but provide you with real distributed communications. Any protocol or traffic-related nonacceptances should be resolved at this time with your prototype application. As for functionality, we need to leverage the Bridge pattern or common interface so that the swap will be easier.
I believe in the following formula:
a successful project = domain-specific business modules + a well-designed framework
A framework should be based on standard components; otherwise, your business-module development will be largely overwhelmed by learning adopted standard technology platforms as well as proprietary technology. The E++ framework moves us towards reusability, extensibility, portability, and customizability. Since the E++ framework is based on standard J2EE components, to integrate or leverage it you'll need only the J2EE developer guide. By leveraging design patterns and a rule engine, E++ builds an efficient, intelligent J2EE application framework. It improves an application's performance, network traffic, and object caching.
The major patterns presented here should serve as a starting point for your development efforts in E++. To reference all of E++ 1.0 beta's patterns, visit http://www.organizeknowledge.com.