<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Free practice test , mock test, driving test, interview questions &#187; Mock  Exam / Certifications</title>
	<atom:link href="http://www.skill-guru.com/blog/category/mock-exam/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.skill-guru.com/blog</link>
	<description>Find free mock and practice test, create and sell tests</description>
	<lastBuildDate>Mon, 16 Jan 2012 16:53:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Preparing for J2EE Architect Certification  &#8211; Understanding Security</title>
		<link>http://www.skill-guru.com/blog/2011/06/07/preparing-for-j2ee-architect-certification-understanding-security/</link>
		<comments>http://www.skill-guru.com/blog/2011/06/07/preparing-for-j2ee-architect-certification-understanding-security/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 19:41:28 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[j2ee architect]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3358</guid>
		<description><![CDATA[In this post we will share some notes about Security. Cryptography in J2ee architect Certification .
Security
Select from a list security restrictions that Java 2 environments normally impose on applets running in a browser. The Java 2 security model is policy-based and has superseded the sandbox/trusted approach of Java 1.1. In Java 1.1 remote code (applets, [...]]]></description>
			<content:encoded><![CDATA[<p>In this post we will share some notes about Security. Cryptography in J2ee architect Certification .</p>
<h2>Security</h2>
<p>Select from a list security restrictions that Java 2 environments normally impose on applets running in a browser. The Java 2 security model is policy-based and has superseded the sandbox/trusted approach of Java 1.1. In Java 1.1 remote code (applets, for example) that was not trusted was constrained to the sandbox. If the remote code was signed and trusted then it could access local resources.</p>
<p>Cryptography, Digital signatures and Certificates can be used to increase the security of a system. Java offers a number of interfaces for related services. Firewalls are also important for protecting the gateway between trusted and untrusted networks.</p>
<p>Code Source:A combination of a set of signers (certificates) and a code base URL.By default, Java 2 uses a policy file to associate permissions with code sources</p>
<p>Security Policy File: permission is the right to access a protected resource or guarded object. For Java 2 permissions are specified in the security policy file. Only one policy is in effect at a time. A policy file consists of a number of grant entries. Each grant entry describes the permissions (one or multiple) granted to a code source.</p>
<p>Policy class: You can use java.security.Policy to create your own security policy.</p>
<p>java.security package : The following are some of the classes in the java.security package:</p>
<p>CodeSource – This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.</p>
<p>KeyStore – This class represents an in-memory collection of keys and certificates. It manages keys and trusted certificates.</p>
<p>MessageDigest – The MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.</p>
<p>Permission – Abstract class for representing access to a system resource.</p>
<p>Policy – This is an abstract class for representing the system security policy for a Java application environment (specifying which permissions are available for code from various sources).</p>
<p>ProtectionDomain – The ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.</p>
<p>Security – Centralizes all security properties and common security methods.</p>
<p>Given an architectural system specification, identify appropriate locations for implementation of specified security features, and select suitable technologies for implementation of those features.</p>
<p>Exposure to threats can be mitigated by using:</p>
<p>Authentication, Authorization (ACLs), Protecting Messages, Auditing</p>
<p><strong>Web tier authentication (This is the usual location for this) </strong></p>
<ul>
<li>Basic HTTP – the web server authenticates a principal with user name &amp; password from Web client</li>
<li>Form-based – lets developers customize the authentication user</li>
<li>HTTPS mutual authentication – the client and server use X.509 certificates to establish identity over a SSL channel.<span id="more-3358"></span></li>
</ul>
<h3>EJB/EIS tier authentication</h3>
<ul>
<li>For EJBs can use protection domains. Thus the EJB tier could entrust the web tier to vouch for the identity of users.</li>
<li>Put a protected web resource in front of a protected EJB resource.</li>
<li>Have every web resource that calls an EJB resource route through a protected web resource</li>
<li>For access to EIS tier resources authentication is usually carried out by the component accessing the EIS resource.</li>
<li>You can have the container manage the EIS resource authentication or have the app do this itself.</li>
<li>Authorization</li>
<li>In J2EE a container serves as an authorization boundary between callers and its components. The authorization boundary is inside the authentication boundary so authorization occurs within the context of successful authentication.</li>
<li>For component to component invocations inside the container the calling component must make its credentials available to the called component.</li>
<li>You can have file-based &amp; code-based security in J2EE.</li>
<li>Access control policy is set a deployment time.</li>
<li>Controlling access to resources in the container (deployment descriptor)</li>
<li>To control access to web resources, specify constraint in the deployment descriptor.</li>
<li>To control access to EJB, specify roles in the deployment descriptor.</li>
<li>You can specify methods of the remote &amp; home interface that each security role is allowed to invoke</li>
<li>Protecting Messages</li>
<li>To ensure message integrity you can use:</li>
<li>Message signature – a enciphered digest of the message contents (costly in terms of CPU cycles)</li>
<li>Message confounder – ensures message authentication is useful only once</li>
<li>A deployer must configure the containers involved in a call to implement integrity mechanisms either because the call will traverse open or unprotected networks or because the call will be made between components that do not trust each other.</li>
</ul>
<h4>Auditing</h4>
<p>When security is breached it is usually more important to know who has been allowed access than who has not. Audit records need to be well protected – tapes or logging to a printer vs disk drive</p>
<h3>Communication security threats</h3>
<p>Eavesdropping: Information is kept intact, but privacy is compromised.</p>
<p>Tampering: Information in transit is changed or replaced and then sent on.</p>
<p>Impersonation: Information passes to the wrong person, who poses as the intended recipient. Persons or systems can pretend to be somebody else (Spoofing) or something else (Misrepresentation).</p>
<h2>Goals of cryptography</h2>
<p>Privacy: Communication between two parties is unintelligible to an intruder.</p>
<p>Tamper detection: Verify that information has not been changed in transit.</p>
<p>Authentication: Confirm that the sender of the information is who he claims to be.</p>
<p>Non-repudiation: Prevents senders from claiming at a later date the information was never sent.</p>
<h3>Symmetric Key Cryptography</h3>
<p>One key is used for encryption and decryption.</p>
<p>Problem is key exchange between remote parties. Advantage is efficient implementation.</p>
<h3>Public-Key Cryptography</h3>
<p>Also called “ asymmetric cryptography”. Pair of two associated keys: The <em>private key </em>is kept secret; the <em>public key </em>is published openly. Encryption with public key ensures privacy.</p>
<h3>Digital signatures</h3>
<p><strong> </strong></p>
<p><strong>Message digest </strong>or one-way hash function: Number of fixed bit length that changes with every subtle change in the message and cannot be reversed.</p>
<p><strong> </strong></p>
<p><strong>Digital signature</strong>: Encryption of the message digest with the public key.</p>
<p>Method: Send digital signature along with message. Receiver calculates message digest of the received message and compares with the decrypted message digest.</p>
<h3>Certificates</h3>
<p>Problem: Verify validity of a person’s public key.</p>
<p><strong> </strong></p>
<p><strong>Certificate</strong>: Electronic document that identifies an individual, a server, a company, or some other entity and associates the entity with a public key.</p>
<p><strong> </strong></p>
<p><strong>Certification authority (CA)</strong>: Validates identity and issues certificates.</p>
<p>Certificates contain identity name, expiration date, CA name and digital signature, and other information like a serial number.</p>
<p><strong>Authentication</strong>: Process of confirming an identity. In general, can be based on assets (ID cards, private key file), knowledge (ID and password), or individual properties (biometrics).</p>
<p>Network authentication can be password-based or certificate-based. Advantage of certificates: Password does not need to be sent across the network. Single-sign on is easier.</p>
<p><strong> </strong></p>
<p><strong>X.509 v3</strong>: ITU Standard for certificate content. X.509 v3 binds a <em>distinguished name </em>(DN) to a public key. DN is a series of name-value pairs, e.g. uid=doe,e=doe@abc.com,cn=John Doe,o=ABC,c=US, like in LDAP.</p>
<p>X.509 Data Section: 1) Version no of X.509 standard 2) Serial number (unique to CA) 3) Information 4) Public Key Info: Algorithm and Data 5) Validity Period 6) Subject’s DN 7) Optional extensions</p>
<p>X.509 Signature Section: 1) Algorithm or cipher used by the CA 2) Digital signature of certificate by CA</p>
<p>Certificate chains: Hierarchy of CA’s, parents certifying children. Allows verifying certificates by just having the trusted public key of the root CA.</p>
<p><strong> </strong></p>
<p><strong>Public Key Infrastructure (PKI)</strong>: Set of standards and services that facilitate the use of public-key cryptography and X.509 v3 certificates.</p>
<p>Key recovery or key escrow: Ability to retrieve backups of private keys under certain, carefully defined conditions. Example is the <em>m-of-n</em> principle, m of n trusted individuals have to agree.</p>
<p><strong> </strong></p>
<p><strong>Public Key Cryptography Standards (PKCS)</strong>: Set of standards driven by RSA Labs with broad industry support. Includes RSA public-key and Diffie-Hellman algorithms.</p>
<h2>Java Security Model</h2>
<p>Security architecture has changed from JDK 1.1 to 1.2. In JDK 1.1, the ‘sandbox model’ distinguished between remote code (applets) that was run with security restrictions in the sandbox, whereas local code was totally trusted. With Java 2, all application code is subject to security control.</p>
<p>The Java language supports writing safe code: Strong type checking, automatic memory management, range checking, JRE bytecode verifier.</p>
<p>The Java 2 platform explicitly supports access control to various important resources like files and sockets through permissions and the SecurityManager.</p>
<p>Protection domain: Conceptual set of resources that are currently available to a principal.</p>
<p>Permissions are resolved by checking the protection domain assigned to a class.</p>
<p>Two main protection domains: Application and system.</p>
<h3>Classes</h3>
<p><em> </em></p>
<p><em>Permission</em>: Abstract base class for all permissions, e.g. java.io.FilePermission.</p>
<p><em> </em></p>
<p><em>PermissionCollection</em>: List of permissions of same type. <em>Permissions</em>: List of PCs.</p>
<p>Types of permissions: (Basic), File, Socket, Property, Property, Runtime, AWT, Net, Security, All</p>
<p>Defining new permissions: Descend from Permission, implement implies method.</p>
<p><em> </em></p>
<p><em>CodeSource</em>: Defines URL of a remote codebase along with associated certificates.</p>
<p><em>Policy</em>: The current security policy. Policy.getPolicy(), getPermissions(CodeSource)</p>
<p><em> </em></p>
<p><em>ProtectionDomain</em>: Uniquely identified by a CodeSource. A class belongs to exactly one PD.</p>
<p><em> </em></p>
<p><em>AccessController</em>: Has checkPermission method (also called by SecurityManager)</p>
<p><em> </em></p>
<p><em>AccessControlContext</em>: Defines state of access control, used to pass access info between threads.</p>
<p><em>Principal</em>: Interface for entities like persons, companies, used in X.509 certificates</p>
<h3>Tools</h3>
<p>keytool</p>
<p>Create public/private key pairs, issue cert requests (for sending to CA), manage key store.</p>
<p>jarsigner</p>
<p>Signing and verifying JAR files. “jarsigner [options] jar-file alias”</p>
<p>policytool</p>
<h3>Files</h3>
<p>Can be found in {JDK Home}/lib/security</p>
<p>Java.security – Security Properties File</p>
<p>Java.policy – System Policy File</p>
<p>Cacerts – Certificates Keystore File</p>
<p>Java Cryptography Architecture (JCA)</p>
<p>Package java.security.</p>
<p>Engine classes: MessageDigest, Signature, KeyPairGenerator, KeyStore, SecureRandom etc.</p>
<p>Interface are implemented by providers.</p>
<p>Default provider SUN is shipped with Sun’s JDK 1.2, includes DSA, MD5, SHA-1, X.509 certs, JKS.</p>
<h2>Additional Java Security Services</h2>
<h2>Java Authentication and Authorization Service (JAAS) 1.0</h2>
<p>Supports access control based on who runs the code. J2SE only supports access control based on where code is coming from and who signed it.</p>
<p>Implements Pluggable Authentication Module (PAM).</p>
<p>Principal: Named entity or account. (Roles and Groups are Principals as well.)</p>
<p>Subject: Person or Service using a system. Represented by a set of Principals.</p>
<p>Credential: Additional security info about a subject, e.g. certificate, password. Public/Private</p>
<p>Two-phase login like two-phase commit.</p>
<p>Authorization: Policy files like Java 2 policies, with new principal key word.</p>
<h3>Java Cryptography Extension (JCE) 1.2.1</h3>
<p>Extensions to the Java Cryptography Architecture (JCA), that is part of J2SE.</p>
<h2>Java Secure Sockets Extension (JSSE) 1.0.2</h2>
<p>Provides SSL (Secure Sockets Layer) 3.0 and TLS (Transport Layer Security) 1.0.</p>
<p>SSLSocket and SSLServerSocket classes</p>
<p>HTTPS support</p>
<p>Package javax.net.ssl</p>
<h3>Firewalls</h3>
<p>A firewall is a system that enforces an access control policy between two networks.</p>
<p>Purpose of firewalls: Control incoming and outgoing travel, address translation, monitoring.</p>
<p>Screening types: Check whether data have been requested, check sender, check content.</p>
<p>Network Address Translation (NAT): Make it seem like all outgoing traffic originates from the firewall.</p>
<p>Attack types: Information theft, Information sabotage, Denial of service.</p>
<p>Firewalls are certified by the ICSA (International Computer Security Agency).</p>
<h3>ICSA firewall categories</h3>
<p>Packet filter firewalls: Based on information in single IP packets; port, source/dest IP address</p>
<p>Application-level proxy servers: Inspection of data for specific services, e.g. HTTP, FTP, SMTP</p>
<p>Stateful packet inspection firewalls: Stores requests and checks incoming data against them.</p>
<p><strong>Additional support might be provided for:</strong></p>
<p>De-militarised zones (DMZ): Zone for protected, controlled public access, separate from intranet.</p>
<p>Virtual Private Networks (VPN). VPN’s are more cost-effective than leased lines or dial-in.</p>
<p>Virus detection</p>
<p>Load Balancing</p>
<h3>Firewall implementation types</h3>
<p>Router/Firmware-based firewalls: Built into router. Usually limited capabilities available.</p>
<p>Software-based firewalls: Sophisticated applications on a workstation. Difficult to maintain.</p>
<p>Dedicated firewall appliances: Best solution. High throughput, less maintenance, more security.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/06/07/preparing-for-j2ee-architect-certification-understanding-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pearson VUE to Deliver Java and other sun Certification products</title>
		<link>http://www.skill-guru.com/blog/2011/05/03/pearson-vue-to-deliver-java-and-other-sun-certification-products/</link>
		<comments>http://www.skill-guru.com/blog/2011/05/03/pearson-vue-to-deliver-java-and-other-sun-certification-products/#comments</comments>
		<pubDate>Tue, 03 May 2011 18:13:59 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[certification]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=4033</guid>
		<description><![CDATA[If you are planning to take any of the Sun or mysql certification exams after June 1, it is important for you to understand that Prometric will no longer be conducting the tests. Oracle has switched to Pearson VUE
From Oracle&#8217;s website
Effective June 1,  2011, Java, Oracle Solaris, MySQL, and NetBeans  certification exams  [...]]]></description>
			<content:encoded><![CDATA[<p>If you are planning to take any of the Sun or mysql certification exams after June 1, it is important for you to understand that Prometric will no longer be conducting the tests. Oracle has switched to Pearson VUE</p>
<p>From Oracle&#8217;s website</p>
<blockquote><p><strong>Effective June 1,  2011, Java, Oracle Solaris, MySQL, and NetBeans  certification exams  will be offered through a new test delivery partner &#8211; <a href="http://www.pearsonvue.com/" target="_blank">Pearson VUE</a> &#8211; and will no longer be available through Prometric.</p>
<p>This will consolidate all Oracle Certification exams within the  operations of a single testing vendor so we can provide better service  and global testing coverage for these Oracle certification exams.  Pearson VUE currently has over <a href="http://www.pearsonvue.com/vtclocator/" target="_blank">5,000 test centers worldwide</a> in 165 countries.</strong></p>
<p>To help  prepare you for this transition, here are some important dates for you to be aware of:</p>
<ul>
<li><strong>If  you are planning to take an exam on/after June 1: </strong>Registration will begin at Pearson VUE on May 16, 2011 for all scheduled exams on or after June 1. Visit <a href="http://pearsonvue.com/oracle" target="_blank">pearsonvue.com/oracle</a> on or after this date to create a new web  account and get started.</li>
<li><strong>If you are currently registered to take an exam with Prometric or planning to take an exam on or before May 31: </strong>You  can continue to register at Prometric through May 23, 2011 (walk-in  registrations will be permitted through May 31, 2011), but you must  complete your exam by June 1, 2011.</li>
</ul>
<li><strong>If you currently have a Sun or Oracle exam voucher or exam retake voucher:</strong>All  vouchers will still be valid through their original expiration date and  will be redeemable with Pearson VUE starting on May 16, 2011.</li>
</blockquote>
<p>Full announcement can be viewed <a href="http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=450">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/05/03/pearson-vue-to-deliver-java-and-other-sun-certification-products/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring certifications tests at Skill-guru</title>
		<link>http://www.skill-guru.com/blog/2011/05/02/spring-certifications-tests-at-skill-guru/</link>
		<comments>http://www.skill-guru.com/blog/2011/05/02/spring-certifications-tests-at-skill-guru/#comments</comments>
		<pubDate>Mon, 02 May 2011 18:03:09 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[spring 3.0]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=4024</guid>
		<description><![CDATA[For users  who have been taking the Spring certification practice tests 1 and  Spring certification practice tests 2 at skill-guru  have raise the concern that
We have contacted the creator of these tests Ikoko , and he has clarified thatthe Spring documentation for the exam syllabus has changed  (improved) since he had created the exam [...]]]></description>
			<content:encoded><![CDATA[<p>For users  who have been taking the <a href="http://www.skill-guru.com/test/81/core-spring-3.0-certification-mock">Spring certification practice tests 1</a> and <a href="http://www.skill-guru.com/test/86/core-spring-3.0-certification-mock-test-2"> Spring certification practice tests 2</a> at skill-guru  have raise the concern that</p>
<p>We have contacted the creator of these tests <a href="http://www.skill-guru.com/guru/ikoko">Ikoko</a> , and he has clarified thatthe Spring documentation for the exam syllabus has changed  (improved) since he had created the exam so the  tests now appear to be different to the syllabus</p>
<p>The  historical documentation and support for the certification has been poor  from Spring and might even be incorrect.</p>
<p>he also pointed out that <a href="http://www.skill-guru.com">Skill-guru</a> test-takers basing their  opinions on the Spring documentation and not actually doing the Spring  exam are therefore possibly misled by the official documentation</p>
<p>From Ikoko&#8217;s email</p>
<blockquote><p>I  sat both the 2.5 exam and 3.0 exam so have experienced both exams  first-hand and have been keen to keep my exams accurate based on real  exam-experience and not any vague syllabus published by Spring</p>
<p>Having  said all, this at a higher topic level I only noticed the category of  SpEL (Spring expression language) being a category in my tests that was  not in the offical syllabus. I had 1 SpEL question in test 1, and 2  questions in test 2. I have now removed all three questions.</p></blockquote>
<p>Hope  this clarifies the doubt of our readers and thanks to MaggieL and Shane Mannion for pointing this out</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/05/02/spring-certifications-tests-at-skill-guru/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is asymmetric clustering &#8211; Part 1</title>
		<link>http://www.skill-guru.com/blog/2011/01/09/what-is-asymmetric-clustering-part-1/</link>
		<comments>http://www.skill-guru.com/blog/2011/01/09/what-is-asymmetric-clustering-part-1/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 04:07:48 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[clustering]]></category>
		<category><![CDATA[j2ee architect]]></category>
		<category><![CDATA[SCEA]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3345</guid>
		<description><![CDATA[Symmetric and asymmetric clustering is one of the very important topics in SCEA. In this post , we will talk about asymmetric clustering.
Traditional J2EE application servers work well for a large class of applications. This class can broadly be categorized as applications that run in a stateless cluster in front of a database. I call [...]]]></description>
			<content:encoded><![CDATA[<p>Symmetric and asymmetric clustering is one of the very important topics in SCEA. In this post , we will talk about asymmetric clustering.</p>
<p>Traditional J2EE application servers work well for a large class of applications. This class can broadly be categorized as applications that run in a stateless cluster in front of a database. I call this a symmetric cluster:</p>
<p>- All the cluster members can perform any task at any time.</p>
<p>- The application is stateless.</p>
<p>- The application is modal which means it only performs work synchronously in response to a client request which can be received using HTTP/IIOP or JMS.</p>
<p>There are other applications that do not work well in such an environment, for example, an electronic trading system in a bank. Such applications typically use tricks that can greatly improve performance such as partitioning, multi-threading and write through caching. These are applications that can exploit asymmetric clustering. An asymmetric cluster is practically the opposite of a symmetric cluster:</p>
<p>- applications can declare named partitions at any point while it&#8217;s running</p>
<p>- partitions are highly available uniquely named singletons and run on a single cluster member at a time</p>
<p>- incoming work for a partition is routed to the cluster member hosting the partition</p>
<p>- The application is amodal. Partitions have a lifecycle of their own and can start background threads/alarms as well as respond to incoming events whether they are IIOP/HTTP or JMS/foreign messages.</p>
<p>WebSphere XD offers a new set of programming API&#8217;s called the &#8220;Partitioning Facility&#8221;. These APIs allow applications that require an asymmetric cluster to be deployed on a J2EE server for the first time to my knowledge.</p>
<h3>How can partitioning improve application performance?<span id="more-3345"></span></h3>
<p>A stateless cluster will only scale so far once the cluster members start competing for database access. If the workload is a read mostly workload then solutions like caching with optimistic locking work well. However, as the write rate increases this starts to break down because of collisions. Some workloads also require incoming work to be executed in order, for example, buy and sell orders for a stock symbol need to be processed in order of price and then in order of arrival. When the work is spread over a cluster then this is made more complex and while it can be done, it&#8217;s not easy. Partitioning allows the application to partition itself, split the incoming requests in to streams corresponding to those partitions and then route incoming work for a particular event/request stream exclusively to a single partition. This incoming work needs to be classified in to partitions and the requests are then routed to the cluster member hosting that partition using either IIOP or messaging. Once the work arrives then the cluster member can aggressively cache read/write data specific to that partition as the developer knows this data can only be modified on this cluster member. The cluster member can also order the work and ensure that it&#8217;s processed in the correct sequence in memory independently of any other cluster members. The database is now offloaded as it just gets writes from the cluster, all reads are satisfied using the cache in the cluster member. So long as there are more partitions than boxes then adding boxes will make this application run faster until the database ultimately becomes a bottleneck.</p>
<p>The other situation where async beans plus partitioning improves performance is that both these features provide low level primitives that can be used to practically build a custom application container that fully leverages the features of the application server. The J2EE specification provides a very high level set of services to an application developer. If this set of services isn’t what the application developer requires then the standard spec does not allow the developer to provide an alternative. The normal option is write a standalone J2SE application that does it or try to have features added to the next release of the commercial application server. The partitioning facility and async beans provide low level primitives that allow this code to run on top of the application server in a fully supported manner. This approach allows advanced customers to have the benefit of using a commercial application server without the normal limitations of the J2EE one size fits all philosophy.</p>
<h3>Why might the asymmetric/partitioned model scale better than the symmetric model?</h3>
<p>A financial application that matches buyers with sellers is an example of one type of application that we&#8217;ve seen. The application trades a set of financial instruments such as stocks. It tracks the buy and sell orders for each stock and attempts to match buyers with compatible sellers. It would also compare the buyers and sellers with prices from other exchanges and may route orders to an external exchange if that exchange is currently posting a better price. Orders should be processed in price order and if orders have the same price then they are processed in the order they arrived. Such a system might receive between 20,000 and 100,000 orders per day but would also receive between 500 and 2000 remote exchange prices/second (2 million prices/hour) and this volume is growing at about 40% a year. Clearly handling the prices volume is the main performance problem. Partitioned application can also better exploit SQL batching to significantly improve performance as they don&#8217;t need to worry about optimistic locking collisions. The rows are only being changed on a single server, no collisions.</p>
<h3>What kind of applications typically implemented on symmetric clusters might benefit from being refactored into asymmetric ones?</h3>
<p>Applications with smaller data sets that experience high request volumes and a relatively high write to read ratio. This kind of application typically doesn’t scale horizontally because of contention between cluster members even using approaches such as optimistic locking.</p>
<p>Applications that require sequenced request handling where a subset of the incoming events must be processed using some sequence or order. This can be implemented more efficiently using partitioning than with approaches using database locking.</p>
<p>Applications that have dynamic messaging requirements. If the set of message queues or topics used by an application changes dynamically during the time the application is deployed then a dynamic POJO message listener framework can be easily constructed with the exact threading model needed by the application rather than the normal cookie cutter approach.</p>
<p>Applications that have very high incoming message rates and where it makes sense to split the incoming message feed so that a specific subset only goes to a single cluster member. We’re partitioning the incoming topics into groups using hashing or some deterministic approach and each cluster member only receives messages for topics assigned to partitions hosted by that cluster member. This cluster member can then aggressively cache state for this subset and this improve performance as well as offloads the database. This again enables horizontal scale up especially when message order is important.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/01/09/what-is-asymmetric-clustering-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>J2EE Architect Study material</title>
		<link>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-study-material/</link>
		<comments>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-study-material/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 19:31:14 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[j2ee architect]]></category>
		<category><![CDATA[SCEA]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3340</guid>
		<description><![CDATA[In the last post I had written about SCEA &#8211; Sun certified J2EE Architect certification topics and  J2EE architect sample questions.
Based on my experience studying for and taking the part 1 of the certification, here is what I would suggest that you read before taking the exam. You could skip a couple of the following [...]]]></description>
			<content:encoded><![CDATA[<p>In the last post I had written about <a href="http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certification-topics/">SCEA &#8211; Sun certified J2EE Architect certification topics</a> and  <a href="http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certifcations-sample-questions/">J2EE architect sample questions</a>.</p>
<p>Based on my experience studying for and taking the part 1 of the certification, here is what I would suggest that you read before taking the exam. You could skip a couple of the following references and still pass (don’t skip the EJBs though).</p>
<table border="1" cellspacing="0" cellpadding="0" width="601">
<tbody>
<tr>
<td width="211" valign="top"><strong>Material</strong></td>
<td width="390" valign="top"><strong>Usage</strong></td>
</tr>
<tr>
<td width="211" valign="top">Enterprise JavaBeans, 2<sup>nd</sup> Ed., by Richard   Monson-Haefel, O’Reilly, ISBN: 1-56592-869-5</td>
<td width="390" valign="top">Read chapters 1 – 9 and discuss in a study group. Cover   around 50 – 60 pages per week. While this book is pretty good, it goes into   more detail than I think you need in order to pass part 1. If you can find a   more concise introduction to EJBs, you may be able to spend less time   studying EJBs. Some chapters are interesting in this book while others seem   very dry to me (however, still useful).    Forming a study group will really help you get through this book and   help you retain what you learn.</td>
</tr>
<tr>
<td width="211" valign="top">EJB 1.1 Specification</td>
<td width="390" valign="top">Reference from time to time while reading the EJB book by   Haefel for clarification.</td>
</tr>
<tr>
<td width="211" valign="top">Java Messaging Service Tutorial, Chapters 1 &amp; 2 (15   pages total)   http://java.sun.com/products/jms/tutorial/doc/jms_tutorialTOC.html’</td>
<td width="390" valign="top">Good intro to JMS and just about right for what you need   on the exam.</td>
</tr>
<tr>
<td width="211" valign="top">Fault Tolerance for CORBA-based Distributed Computing.</p>
<p><a href="http://dantanner.tripod.com/FT.htm">http://dantanner.tripod.com/FT.htm</a></td>
<td width="390" valign="top">Nice short article that gives you the concepts.</td>
</tr>
<tr>
<td width="211" valign="top">Jguru article on Internationalization</p>
<p><a href="http://d23xapp2.cn.ibm.com/developerworks/education/unicode/i18n_eng">http://d23xapp2.cn.ibm.com/developerworks/education/unicode/i18n_eng</a></td>
<td width="390" valign="top">Just about right for the exam. However, someone said that   there was a pretty good tutorial on Sun’s website. You might try Suns   tutorial first. While pretty good, I thought this article wasn’t as clear as   it could have been. However, it is about the right amount for the test.</td>
</tr>
<tr>
<td width="211" valign="top">Network Security: A Simple Guide to Firewalls</p>
<p>http://www.3com/other/pdfs/infra/corpinfo/en_US/50309001.pdf</td>
<td width="390" valign="top">Easy to read and short article that introduces the   concepts and terms of firewalls. Another article on firewalls in addition or   instead of this one would be useful. However, I don’t know of any others.</td>
</tr>
<tr>
<td width="211" valign="top">JavaWorld article on RMI over IIOP</p>
<p><a href="http://www.javaworld.com/javaworld/jw-12/1999/jw-12-iiop_p.html">http://www.javaworld.com/javaworld/jw-12/1999/jw-12-iiop_p.html</a></td>
<td width="390" valign="top">Pretty good, but you might check for a related tutorial on   Suns website instead.</td>
</tr>
<tr>
<td width="211" valign="top">Java Security Evolution and Concepts, Part 1 and Part 2</p>
<p><a href="http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-security_p.html">http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-security_p.html</a></td>
<td width="390" valign="top">From my experience on the exam, you just need to know very   basic concepts and terminology about encryption and security in general as   well as something about JDK 1.2 security model and possibly the difference   between JDK 1.1 and JDK 1.2 security models. You might want to read another   article about JDK security. However, I don’t have any other references.</td>
</tr>
<tr>
<td width="211" valign="top">Introduction to SSL</p>
<p><a href="http://developer.netscape.com/docs/manuals/security/sslin/contents.htm">http://developer.netscape.com/docs/manuals/security/sslin/contents.htm</a></td>
<td width="390" valign="top">I’m not sure this one is necessary. Consider skipping this   one. I don’t recall any questions specifically about SSL on the exam, but   other people’s exam notes often include SSL suggesting that you might get a   question on it.</td>
</tr>
<tr>
<td width="211" valign="top">The book Design Patterns by Gamma, Helm, Johnson and   Vlissides (often referred to as the Gang of Four (GoF)), Adddison-Wesley</td>
<td width="390" valign="top">Do not try to read this book front to back. I recommend   reading roughly the first four pages of each pattern and that may be more   than you need for the test. The questions were very basic, straight forward   questions about the easier to remember patterns such as singleton, proxy and   iterator. We covered 5 patterns per week discussing all five patterns in one   hour. We used the rest of the meeting time to do practice exam questions on   other topics. In order to touch on 5 patterns in an hour, someone needs to   come prepared with discussion questions and lead the discussion with quite a   bit of authority without being overbearing. The goal during the meeting is   not to discuss each pattern in detail, but to at least touch on each one   briefly. The primary benefit of the study group is that it encourages you to   read about the 5 patterns on your own time because you know that you are   going to come and discuss it. You get the most benefit from the reading. The   meeting just encourages you to read and also helps you retain what you   learned.</td>
</tr>
<tr>
<td width="211" valign="top">The Design Patterns Java Companion</p>
<p>http://patterndepot.com/put/8/JavaPatterns.htm</td>
<td width="390" valign="top">This book illustrates the GoF patterns with   implementations in Java. Skim through the sections in this book on any   patterns that aren’t real clear to you after reading about them in the GoF.   However, don’t spend too much time on this book. Use it as a reference only.</td>
</tr>
<tr>
<td width="211" valign="top">UML Distilled</td>
<td width="390" valign="top">Read the front and back covers and skim through as much of   the book as necessary to understand how the notation on the front and back   covers of the book is used.</td>
</tr>
<tr>
<td width="211" valign="top"></td>
<td width="390" valign="top"></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-study-material/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>J2EE Architect Certifcations sample questions</title>
		<link>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certifcations-sample-questions/</link>
		<comments>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certifcations-sample-questions/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 19:30:50 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[j2ee architect]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3337</guid>
		<description><![CDATA[These are example of actual questions from the J2EE Architect certification test as best as I could remember them a couple of hours after taking the exam. I don’t have the exact multiple choice options in most cases, but the following questions should give you some idea how well you need to know at least [...]]]></description>
			<content:encoded><![CDATA[<p>These are example of actual questions from the J2EE Architect certification test as best as I could remember them a couple of hours after taking the exam. I don’t have the exact multiple choice options in most cases, but the following questions should give you some idea how well you need to know at least some of the topic areas. The questions were easier than I had expected for the most part. The questions mostly tested your understanding of terms and concepts at a high level.</p>
<p>There is another test with 22 questions <a href="../../test/147/j2ee-architect-certification-practice-test">J2EE Architect Certification Practice Test</a> which is similar to what you take in Part 1</p>
<p>The test will tell you how many correct answers there are for each question, and the software will let you know if provide more or less answers than the expected amount. The structure of the multiple choice test was helpful and made the test a little easier. There are 48 questions on the test and you have 90 minutes to complete the test. I finished with 20 minutes to spare and spent the extra time going over my answers. The software allows you to skip questions and also mark questions. After answering question 48, you get a display showing the questions that you have skipped, are incomplete because you didn’t provide as many answers as expected, as well as questions that you have marked. You can then revisit any of the questions. The software also always displays the amount of time you have remaining.</p>
<table style="height: 413px;" border="1" cellspacing="0" cellpadding="0" width="597">
<tbody>
<tr>
<td width="295" valign="top"><strong>Question</strong></td>
<td width="295" valign="top"><strong>Comments/My Answer</strong></td>
</tr>
<tr>
<td width="295" valign="top">Where is JNDI used in JSM?</td>
<td width="295" valign="top">It is used to look up several of the key objects in the   JSM model.</td>
</tr>
<tr>
<td width="295" valign="top">What pattern does JDBC ResultSet implement?</td>
<td width="295" valign="top">Iterator</td>
</tr>
<tr>
<td width="295" valign="top">What aspect of firewalls affects the ability of various   protocols to get through. Three of the possible answers were: port filtering,   address filtering and address translation.</td>
<td width="295" valign="top">Not sure what is the right answer. Let me know if you have   an answer and please give me a reference where I can find documentation that   supports the answer.</td>
</tr>
<tr>
<td width="295" valign="top">What 2 services does EJBs provide? Three of the 4 options   were: life cycle management, transaction services, remote method invocation</td>
<td width="295" valign="top">I believe the answer is life-cycle management and   transaction services. EJBs do provide remote access, but it isn’t considered   a considered a service.</td>
</tr>
<tr>
<td width="295" valign="top">Where would encryption be necessary in a scenario where a   buyer and a seller used a web browser to buy and sell items on the web and   credit card info was verified by a separate system. Items being sold are   stored in a database. Select 2 of the three possible places: between buyer   and server, seller and server, server and credit card authority.</td>
<td width="295" valign="top">Where ever credit card info is passed which is from buyer   to system/database and between system and credit card authority. I don’t   recall anything more specific than this being asked about encryption. Some   questions that I can’t remember in detail required knowledge of JDK security   model and I believe it touched on the differences between JDK 1.1 and JDK 1.2   security models.</td>
</tr>
<tr>
<td width="295" valign="top">What aspects of a system vary by locale?</td>
<td width="295" valign="top">String formats, dates, order that things are sorted, how   currency is displayed.</td>
</tr>
<tr>
<td width="295" valign="top">What kind of operations should be performed in   ejbPassivate and ejbActivate on a stateful EJB?</td>
<td width="295" valign="top">Free/restore connections to resources.</td>
</tr>
<tr>
<td width="295" valign="top">One question tested my understanding of EJB transaction   attributes (not supported, supported, required, required new, etc.)</td>
<td width="295" valign="top"></td>
</tr>
<tr>
<td width="295" valign="top">One question required understanding of a Handle object   relative to EJBs.</td>
<td width="295" valign="top"></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certifcations-sample-questions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>J2EE Architect Certification Topics</title>
		<link>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certification-topics/</link>
		<comments>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certification-topics/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 19:29:24 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[j2ee architect]]></category>
		<category><![CDATA[SCEA]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3334</guid>
		<description><![CDATA[In this next series of posts, I will post tons of articles and notes on Sun&#8217;s J2EE architect certification (SCEA). I had taken this exam way back in 2005 . I could not find the study materials until few days back. Now I am posting this stuff and although this might have gone under upgrade, [...]]]></description>
			<content:encoded><![CDATA[<p>In this next series of posts, I will post tons of articles and notes on Sun&#8217;s J2EE architect certification (SCEA). I had taken this exam way back in 2005 . I could not find the study materials until few days back. Now I am posting this stuff and although this might have gone under upgrade, it still could be useful.</p>
<p>The following topic areas are not how Sun breaks it out. Rather, it is how I would break it out in terms of the topics that you need to study. At least 16 out of the 48 questions on the exam when I took it where related to EJBs. There were between 2  and 5 questions on all other topic areas.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="235" valign="top"><strong>Topic Area</strong></td>
<td width="355" valign="top"><strong>Comments</strong></td>
</tr>
<tr>
<td width="235" valign="top">Architecture Concepts and Terms</td>
<td width="355" valign="top">General stuff like what affects scalability,   maintainability, availability. Also, things like HTTP tunneling and screen   scrappers.</td>
</tr>
<tr>
<td width="235" valign="top">Clustering</td>
<td width="355" valign="top">You need to know what clustering is in general and what   quality attributes (e.g. scalability, maintainability, etc. it affects). I   have a general idea what clustering is, but I didn’t read anything on   clustering and probably got a question or two wrong as a result.</td>
</tr>
<tr>
<td width="235" valign="top">EJBs</td>
<td width="355" valign="top"></td>
</tr>
<tr>
<td width="235" valign="top">Security</td>
<td width="355" valign="top">Need to know very basic/general terms and concepts about   encryption. Also need to understand JDK 1.2 and possibly JDK 1.1 security   model.</td>
</tr>
<tr>
<td width="235" valign="top">UML</td>
<td width="355" valign="top">Had 3 or 4 very simple questions about UML notation and   terminology. The questions were about class diagram notation and sequence   diagram notation. Very basic. You don’t need to read a whole book or even   most of a book to get these right. Just review a summary of UML notation such   as the front and back pages of the UML Distilled book.</td>
</tr>
<tr>
<td width="235" valign="top">Patterns</td>
<td width="355" valign="top">Very straight forward questions about the purpose of simple   patterns such as iterator, singleton and proxy.</td>
</tr>
<tr>
<td width="235" valign="top">Internationalization</td>
<td width="355" valign="top"></td>
</tr>
<tr>
<td width="235" valign="top">Protocols</td>
<td width="355" valign="top">Requires general understanding of SHTML, IIOP, RMI-IIOP.</td>
</tr>
<tr>
<td width="235" valign="top">JMS</td>
<td width="355" valign="top">Very basic questions that had to do with what is JMS good   for and the terms such as publish/subscribe, topics, queues, point-to-point,   asynchronous.</td>
</tr>
<tr>
<td width="235" valign="top">Firewalls/DNS Round-Robin</td>
<td width="355" valign="top">Need to understand a little bit about firewalls and DNS   round-robin relate as well as what might happen in different scenarios   involving a client trying to access some resource through a firewall on a   given ip address and port number considering what the firewall is configured   to allow/disallow and what kind of firewall it is.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/01/09/j2ee-architect-certification-topics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visitor Design Pattern</title>
		<link>http://www.skill-guru.com/blog/2011/01/09/visitor-design-pattern/</link>
		<comments>http://www.skill-guru.com/blog/2011/01/09/visitor-design-pattern/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 14:44:32 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[j2ee architect]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3538</guid>
		<description><![CDATA[Visitor Design Pattern
Problem
Sometimes we have multiple operations that need to be implemented on a structure of objects. Traditionally we would implement each of the objects to derive of a base class with each of the operations, and then override the operations to implement them. This can be a problem if the operations are different in [...]]]></description>
			<content:encoded><![CDATA[<h3>Visitor Design Pattern</h3>
<p><strong>Problem</strong></p>
<p>Sometimes we have multiple operations that need to be implemented on a structure of objects. Traditionally we would implement each of the objects to derive of a base class with each of the operations, and then override the operations to implement them. This can be a problem if the operations are different in nature, as well as if the number of operations exceeds the number of different subclasses in the tree. How can we overcome this problem?</p>
<p><strong>Solution</strong></p>
<p>The solution is the visitor pattern. The visitor pattern has each object class in the structure only has one method called <em>AcceptVisitor()</em> which takes a visitor class as a parameter. A visitor is an implementation of a particular operation, and has methods for each of the class types in the structure. The object in the structure calls its appropriate method on the visitor. For example, if a tree structure contained two types of classes, <em>Foo</em> and <em>Fib</em>. Then when we wanted to perform a function on them we pass down a visitor that implements the function, and nodes of type <em>Foo</em> call the <em>VisitedFoo()</em> function on the visitor, which implements the function for objects of type <em>Foo</em></p>
<p><strong>Consequences</strong></p>
<p>It is easy to add operations, simply derive anew visitor class.</p>
<p>However, it is hard to add new class types to the structure, since you need to change both the base class and all subclasses of the visitors for the change.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/01/09/visitor-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chain of Responsibility Design Pattern</title>
		<link>http://www.skill-guru.com/blog/2011/01/09/chain-of-responsibility-design-pattern/</link>
		<comments>http://www.skill-guru.com/blog/2011/01/09/chain-of-responsibility-design-pattern/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 14:44:10 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[j2ee architect]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3534</guid>
		<description><![CDATA[Chain of Responsibility Design Pattern
Problem
Consider the case where you have a structural hierarchy of object that is not necessarily subclasses from the same base class. Now lets say there is a piece of functionality that they all can implement, but it is not statically determinate which should handle the case. Now I know that sounds [...]]]></description>
			<content:encoded><![CDATA[<h2>Chain of Responsibility Design Pattern</h2>
<p><strong>Problem</strong></p>
<p>Consider the case where you have a structural hierarchy of object that is not necessarily subclasses from the same base class. Now lets say there is a piece of functionality that they all can implement, but it is not statically determinate which should handle the case. Now I know that sounds a little complicated, but picture a context sensitive help system. Each piece of the display may have a piece of text that is wants to display when ever the cursor is over top of it, or it may not. In the case where a piece doesn&#8217;t want to handle it, you want the class that contains it to display a more general help string. You also want this system to be dynamic at run-time. How can this be done?</p>
<p><strong>Solution</strong></p>
<p>The Chain of responsibility can solve this problem. The chain of responsibility requires that each of the classes involved inherit from a base class, let&#8217;s say <em>HelpHandler</em>. Now when they are instantiated, the objects all initialize their parent class with a successor, which is a reference to another object that is also derived from the base class. When the time comes to call the method that you want to pass up the chain, the first object picked is the most appropriate one. If the object doesn&#8217;t want (or can&#8217;t handle) the request, it calls the <em>BaseClass::Method()</em> which calls the method for the successor, and so on, until one of the objects handles the request.</p>
<p><strong>Consequences</strong></p>
<p>The chain of responsibility makes it so the client doesn&#8217;t need know who is in fact handling the request, only that the request is being handled. As well, you can change the hierarchy at run-time to provide for a changing environment. However, it should be noted that in this system all participants in the chain could refuse to handle the request, and the client would not know.</p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/01/09/chain-of-responsibility-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command Design Pattern</title>
		<link>http://www.skill-guru.com/blog/2011/01/09/command-design-pattern-design-pattern/</link>
		<comments>http://www.skill-guru.com/blog/2011/01/09/command-design-pattern-design-pattern/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 14:43:13 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Mock  Exam / Certifications]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[j2ee architect]]></category>
		<category><![CDATA[SCEA]]></category>

		<guid isPermaLink="false">http://www.skill-guru.com/blog/?p=3536</guid>
		<description><![CDATA[Problem
How can we issue request to other objects in a system, without having to know who will receive the request, or even what the request is? This can be useful for implementing functionality such as a menu system, where each menu item has a command that it executes, but it doesn&#8217;t want to know what [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong></p>
<p>How can we issue request to other objects in a system, without having to know who will receive the request, or even what the request is? This can be useful for implementing functionality such as a menu system, where each menu item has a command that it executes, but it doesn&#8217;t want to know what it is, it only needs to trigger the command at the right time. How can this be done?</p>
<p><strong>Solution</strong></p>
<p>The command pattern is simple the use of objects as commands in a system. The command class has a virtual member called <em>Execute()</em>. In our above example, the menu item could take a command object as an initialization parameter, and when the application runs, then menu item gets a command, the when the menu item is clicked it calls <em>Execute()</em> on the command.</p>
<p><strong>Consequences</strong></p>
<p>Commands are very powerful, and can support a lot of different functionality. For example, if the command registered itself with some global undo class when it executes, then simply by reversing each command in reverse order (I smell a stack…) we can undo any sequence of commands provided every command class can be undone. Command object separates the object that triggers an operation from the one that executes the operation. By using the <a href="http://www.cs.washington.edu/homes/bdudash/designpatterns/composite.html">Composite pattern</a> you can extend a command to execute multiple commands. And since all commands derive from the command base class, adding new commands is easy.</p>
<p>I myself have used this pattern to implement a dynamic console in a game. At run-time, sections of code register commands into the console. The console then accepts textual input, and pattern matches against a <em>Name()</em> method of each command, and upon finding a match it calls <em>Execute()</em> on the command. I had implemented this before discovering Design Patterns, so could have saved myself a lot of work in knowing the intricacies of this pattern if I had read the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.skill-guru.com/blog/2011/01/09/command-design-pattern-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

