<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4245708558540583378</id><updated>2011-11-27T16:29:05.341-08:00</updated><category term='certificate'/><category term='EJB'/><category term='SCEA'/><category term='SCJP'/><category term='exam preparation'/><category term='Java'/><category term='J2EE'/><category term='SCWSD'/><category term='patterns'/><title type='text'>Beginning from Java...</title><subtitle type='html'>SCEA exam preparation blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-4877466524490369194</id><published>2008-10-06T08:06:00.001-07:00</published><updated>2009-04-09T14:25:18.321-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>SCEA preparation materials I used</title><content type='html'>Just sorting some folders on my laptop =)&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Books (links mostly to Amazon.com):&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/EJB-3-Action-Debu-Panda/dp/1933988347"&gt;Enterprise Java Beans in Action&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Java-Message-Service-OReilly/dp/0596000685"&gt;O'Reilly. Java Message Service (JMS)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Certified-Enterprise-Architect-Study-310-051/dp/0072226870"&gt;McGraw Hill. SCEA for J2EE Study guide&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Certified-Enterprise-Architecture-Technology-Microsystems/dp/0130449164"&gt;Mark Cade's SCEA preparation guide&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Mastering-JavaServer-Faces-Java-Dudney/dp/0471462071"&gt;Mastering Java Server Faces&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Core-J2EE-Patterns-Practices-Strategies/dp/0131422464"&gt;Sun's Core J2EE patterns&lt;/a&gt;  (pay attention to use second edition of this book!!!&lt;br /&gt;&lt;a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612"&gt;GoF patterns&lt;/a&gt;&lt;br /&gt;&lt;a href="http://soabook.com/"&gt;SOA using Java Web Services&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Practical-Application-Architecture-Nadir-Gulzar/dp/0072227117"&gt;McGraw Hill. Practical J2EE Application Architecture&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.whizlabs.com"&gt;Mock tests from Whizlabs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Free books and resources:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.theserverside.com/tt/books/wiley/masteringEJB3/index.tss"&gt;Mastering EJB. 4th edition&lt;/a&gt;&lt;br /&gt;&lt;a href="http://java.sun.com/developer/technicalArticles/WebServices/JWS_2/JWS_White_Paper.pdf"&gt;Java Web Start white paper&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.javaranch.com"&gt;www.javaranch.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://java.sun.com/webservices/docs/1.6/tutorial/doc/"&gt;Sun's Java WS tutorial&lt;/a&gt;&lt;br /&gt;Presentations, articles and other resources from the Sun's site about web services, JSF etc. (there are some mock tests by the way)&lt;br /&gt;&lt;br /&gt;In conclusion, I'd like to say, that it's better to use not the info from the books but from the official Sun articles or blogs which are numerous enough. Books are just out of date in most cases, especially on the topics concerned with WS or SOA. They can be useful only for gaining basic understanding of the technology.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-4877466524490369194?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/4877466524490369194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=4877466524490369194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/4877466524490369194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/4877466524490369194'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/10/scea-preparation-materials-i-used.html' title='SCEA preparation materials I used'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-5311082150948310423</id><published>2008-09-11T14:31:00.000-07:00</published><updated>2009-04-09T14:25:18.321-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>SCEA Level 1 passed</title><content type='html'>Well, SCEA Level 1 is passed. =)))))))))))&lt;br /&gt;It was a difficult test but I coped with it. Main attention was paid to JSP/JSF, WS, and SOA -- in other words, to all relatively new technologies. And really-really-really, my special thanks to those people who created this test because the questions were clever and let me identify some points where my knowledge was weak. However, these points were luckily not so numerous =))&lt;br /&gt;Now, in one or two months I'm going to take and pass part 2 and 3 of the SCEA exam. So, I guess I need a good study in UML and all the related stuff.&lt;br /&gt;&lt;br /&gt;I would be grateful for your comments to this post or any of my notes =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-5311082150948310423?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/5311082150948310423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=5311082150948310423' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5311082150948310423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5311082150948310423'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/09/scea-level-1-passed.html' title='SCEA Level 1 passed'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-6862955172585816925</id><published>2008-08-29T00:53:00.000-07:00</published><updated>2009-04-09T14:25:18.321-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Final post on SCEA: GOF patterns</title><content type='html'>Well, this topic is already “stuck in teeth”; however, it’s one of the most important topics on SCEA exam.&lt;br /&gt;I tried not to include in this part of notes the info which is obvious, clear or omnipresent. I just wanted to stress some points which are useful and can be easily remembered.&lt;br /&gt;Some of the examples are adapted from different sources, books, notes and articles including but not limited to:&lt;br /&gt;Applied Java patterns, Stephen Stelting, 2001&lt;br /&gt;Mark Cade’s SCEA preparation guide&lt;br /&gt;Notes from www.leocrawford.org.uk &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Creational&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;Abstract factory &lt;br /&gt;Main idea: creation of a family of interdependent objects without specifying their concrete class&lt;br /&gt;Drawback: additional classes are needed&lt;br /&gt;Example: An application is creating phone records, each country has got its own rules regarding the format. Common rules are applied by factory while creation, other -- determined at runtime&lt;br /&gt;&lt;br /&gt;Factory method&lt;br /&gt;Main idea: defer specifying concrete class created to subclasses&lt;br /&gt;Drawback: additional classes are needed&lt;br /&gt;Example: Connection factories are used by JDBC to connect to EIS's using DAO's&lt;br /&gt;&lt;br /&gt;Builder&lt;br /&gt;Main idea: complex object is created from different sources. Algorithm for its creation is independent of both the parts that make up the object and how those parts are assembled&lt;br /&gt;Drawback: tight coupling&lt;br /&gt;Example: Creating an appointment in the calendar. You step by step specify date, reason, participants etc&lt;br /&gt;&lt;br /&gt;Prototype &lt;br /&gt;Main idea: a prototype is created which can be copied later by concrete subclasses which specify the details&lt;br /&gt;Example: Cloneable interface; creation of a record, some of fields in which are the same as in another, “base” record&lt;br /&gt;&lt;br /&gt;Singleton&lt;br /&gt;Drawback: may present threading problems&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Structural&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;Adapter&lt;br /&gt;Main idea: integration of incompatible interfaces&lt;br /&gt;Example: EIS &lt;br /&gt;&lt;br /&gt;Bridge&lt;br /&gt;Main idea: two separate hierarchies: of abstractions and of implementations&lt;br /&gt;Example: JDBC, JMS, JCA&lt;br /&gt;Improves extensibility; hides implementation detail from clients&lt;br /&gt;&lt;br /&gt;Proxy&lt;br /&gt;Main idea: to use a simple object to represent a complex one.&lt;br /&gt;Virtual proxy – if creation of object is too expensive in time or memory, you can postpone it until you really need it&lt;br /&gt;Remote proxy – to hide the fact that you are querying a remote object&lt;br /&gt;Protection proxy – to determine access rights&lt;br /&gt;Examples: Proxy is used in RMI, WS; Session bean may act as a proxy to Entity bean&lt;br /&gt;&lt;br /&gt;Flyweight&lt;br /&gt;Main idea: interchangeable instances; application doesn't depend on object identity&lt;br /&gt;May be used when storage costs are high&lt;br /&gt;Drawback: functionality is calculated at runtime which may decrease performance&lt;br /&gt;Example: pooling stateless session beans&lt;br /&gt;&lt;br /&gt;Composite&lt;br /&gt;Main idea: hierarchical tree structure of varying complexity with a uniform interface&lt;br /&gt;Drawback: difficult to test&lt;br /&gt;Example: Composite JSP view&lt;br /&gt;&lt;br /&gt;Decorator&lt;br /&gt;Main idea: add additional “plug-in”capabilities on the fly without modifying the class hierarchy&lt;br /&gt;Simplifies coding as each feature is implemented in a separate class; enhances extensibility&lt;br /&gt;Drawback: difficult to test and debug&lt;br /&gt;Example: pre/post-processing filters, graphical editors, java IO classes&lt;br /&gt;&lt;br /&gt;Façade&lt;br /&gt;Main idea: hide the complexities of a subsystem behind a unified interface&lt;br /&gt;Promotes weak coupling between the subsystem and its clients; translates client requests to subsystem that can fulfill request&lt;br /&gt;Example: Session beans facade&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Behavioral&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Interpreter&lt;br /&gt;Example: parsers, regex&lt;br /&gt;Efficiency is not critical&lt;br /&gt;&lt;br /&gt;Template Method&lt;br /&gt;Fundamental technique for reusing code, allows to avoid code duplication&lt;br /&gt;Main idea: subclasses can specify slight parts of algorithm and behavior&lt;br /&gt;&lt;br /&gt;Mediator&lt;br /&gt;Main idea: MOM&lt;br /&gt;Examples: widely used in WS, SOA Enterprise service bus&lt;br /&gt;Another usage: to customize a behavior that is distributed between several objects without using subclasses&lt;br /&gt;Simplifies object protocols&lt;br /&gt;&lt;br /&gt;Memento&lt;br /&gt;Main idea: take a snapshot and preserve encapsulation; may provide undo/redo features when used with Command&lt;br /&gt;Examples: 2PC, Stateful session bean passivation&lt;br /&gt;&lt;br /&gt;Iterator&lt;br /&gt;Used in Collection API&lt;br /&gt;&lt;br /&gt;State&lt;br /&gt;Main idea: Makes state transitions explicit and updatable at runtime; allows avoiding large conditional statements&lt;br /&gt;Drawback: additional classes (each state is represented by its own subclass)&lt;br /&gt;&lt;br /&gt;Visitor&lt;br /&gt;Main idea: define a new operation without changing the classes of the elements on which it operates, separate complex algorithms from the object; easy to add new operations&lt;br /&gt;Drawback: may break encapsulation, reduces flexibility&lt;br /&gt;Common usage: object structure contains many classes of objects with differing interfaces and you want to perform operations on these objects that depend on concrete class&lt;br /&gt;&lt;br /&gt;Strategy&lt;br /&gt;Main idea: ability to select among different types of interchangeable behavior and algorithms&lt;br /&gt;Pluggable behavior, alternative to subclassing&lt;br /&gt;Example: implementing different sorting algorithms in one class&lt;br /&gt;&lt;br /&gt;Observer&lt;br /&gt;Main idea: publish/subscribe model&lt;br /&gt;Is used when an object should be able to notify other objects without making assumptions about their identity&lt;br /&gt;Example: JMS; event handling&lt;br /&gt;&lt;br /&gt;Command&lt;br /&gt;Main idea: encapsulate request as an object&lt;br /&gt;Separates the object performing an operation from the one that knows how to perform it&lt;br /&gt;When to use: GUI menus and toolbars; support of logging, undo or transactions&lt;br /&gt;Requests are specified, queued and executed at different times and instances may be shared&lt;br /&gt;&lt;br /&gt;Chain of Responsibility&lt;br /&gt;Main idea: object is handled in turn by several dynamically pluggable classes&lt;br /&gt;Commonly used for parsers and event compilers&lt;br /&gt;Reduces coupling, provides pluggable behavior. Allows a set of classes to behave as a whole, because events produced in one class can be set on to other handlers within the composite&lt;br /&gt;Examples: Servlet filters, SOAP message handlers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-6862955172585816925?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/6862955172585816925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=6862955172585816925' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/6862955172585816925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/6862955172585816925'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/final-post-on-scea-gof-patterns.html' title='Final post on SCEA: GOF patterns'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-3692251149454816409</id><published>2008-08-27T12:57:00.000-07:00</published><updated>2009-04-09T14:25:18.322-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>JSF and JSP</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Benefits of JSF&lt;/span&gt;&lt;br /&gt;Hides complexities of Web development by using components&lt;br /&gt;Don’t need to worry about HTTP requests/responses (as in servlets)&lt;br /&gt;MVC separation&lt;br /&gt;Allows to manage UI components as stateful objects on the server&lt;br /&gt;Provides a rich architecture for validation, processing etc.&lt;br /&gt;Allows to create new custom components&lt;br /&gt;&lt;br /&gt;The main difference from JSP in that JSF is component-based and JSP is markup-based&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Drawbacks of JSF&lt;/span&gt;&lt;br /&gt;Bad with search engines (at least, it’s written everywhere =))&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JSP lifecycle&lt;/span&gt;&lt;br /&gt;1. Translation time. JSP is converted into a servlet. This happens each time JSP is modified.&lt;br /&gt;2. Request time. The resulting servlets is run to generate the page. This happens each time JSP is requested by a browser.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JSF lifecycle&lt;/span&gt;&lt;br /&gt;1. Restore view&lt;br /&gt;2. Apply request values&lt;br /&gt;3. Apply validation&lt;br /&gt;4. Update model&lt;br /&gt;5. Invoke application&lt;br /&gt;6. Render response&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scriptlets&lt;/span&gt;&lt;br /&gt;Scriptlets are pieces of Java code embedded directly into a JSP page. They are not maintainable, so they should be used only for very simple and non-repeating operations. Scriptlet code may be factored forward into a servlet or converted into custom tag.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Custom tags&lt;/span&gt;&lt;br /&gt;Custom tags are present both in JSP and JSF. Custom tags let software developers and Web designers work independently. In other words, a general expectation of custom tags is that they should be used by non-programmers.&lt;br /&gt;Custom tags may be created as JSP or as Java classes since JSP 2.0. They are single-threaded. Attributes of custom tag are fields in class implementing it. Custom tags may introduce caching capability.&lt;br /&gt;Common applications for custom tags are iteration through a collection and providing some layout for the results, representing some custom component combined of several standard components, which is used repeatedly etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When to use servlets and when custom tags? &lt;/span&gt;&lt;br /&gt;Servlets are better suited for controller and navigation functions and have more limited capabilities. Custom tags are for providing simple access to manipulating business logic or complex components for non-developers (designers etc.).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Managed beans&lt;/span&gt;&lt;br /&gt;Managed beans are used for:&lt;br /&gt;1. UI components&lt;br /&gt;2. Form behavior&lt;br /&gt;3. Business objects whose properties are displayed on web pages&lt;br /&gt;4. Configuring external services (data sources, WS etc.)&lt;br /&gt;Managed bean represents Command pattern.&lt;br /&gt;Managed beans usually require introducing some scriptlet code into the view which causes decline in maintainability. However, in general they improve manageability and are easy to understand.&lt;br /&gt;Managed beans are analogous to entities in some way. EJB 3.0 allows Entity beans be used outside a container as POJOs and managed beans respectively.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Patterns in JSF&lt;/span&gt;&lt;br /&gt;MVC: JSP + Servlets + managed beans&lt;br /&gt;Composite, Composite View – for JSP templates&lt;br /&gt;Observer: events from the page are sent to all listeners to be processed&lt;br /&gt;Memento: storing form values in Java beans&lt;br /&gt;Façade: Form class may act as a façade hiding bean complexities from JSP client; encapsulates and simplifies access to reusable code&lt;br /&gt;Strategy: Layout Managers which define a family of algorithms and encapsulate each one. This makes those algorithms interchangeable&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JSP with XML&lt;/span&gt;&lt;br /&gt;Pages may be rendered using XSL/XSLT/XPath processing. This strategy is good for some kind of report generation. &lt;br /&gt;Moreover, JSP may get XML documents to render. However, JSP never directly works on XML data. Some kind of parsing or binding mechanism is&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-3692251149454816409?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/3692251149454816409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=3692251149454816409' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3692251149454816409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3692251149454816409'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/jsf-and-jsp.html' title='JSF and JSP'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-1701494669469927018</id><published>2008-08-22T16:23:00.000-07:00</published><updated>2009-04-09T14:25:18.322-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Web services (a laaaaaarge topic) =)</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Why to use WS&lt;/span&gt;&lt;br /&gt;WS’s common usage is to integrate heterogeneous applications quickly. They can be integrated across firewalls because WS use HTTP. Primary target of WS are B2B scenarios.&lt;br /&gt;SOA is represented in WS because WS support interoperability and loose coupling. Moreover, services are composable, self-contained and modular, discoverable and dynamically bound.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Document-based vs. RPC-based (procedure-style)&lt;/span&gt;&lt;br /&gt;Document-style services are preferred when state maintenance is needed, for validation or when standard XML-schemas are used. They assume transporting an XML document (maybe as an attachment to SOAP message) and having a way to parse it. RPC-based services rely on JAX-WS support of automatic parsing of SOAP messages. Document-style services usually use SAX, StAX. RPC-based can use DOM which causes performance overhead. RPC-based services are synchronous and document-based (message-based) are asynchronous. SOAP supports both.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;WSDL-to-Java vs. Java-to-WSDL&lt;/span&gt;&lt;br /&gt;WSDL-to-Java approach is preferred if services are written in different languages because it is then easier to define interoperable types. However, it requires good knowledge of WSDL and WS-I Basic Profile. Implementation-first (Java-to-WSDL) approach is easier (don’t need knowledge of WSDL, just generate it) but may cause integration problems after code changes (these changes affect WSDL and, therefore, client).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;State&lt;/span&gt;&lt;br /&gt;Web Services are stateless in their implementation (Stateless Session bean or Servlet). However, if a stateful business process is needed state may be maintained in front-end, in backend or in service itself. The choice where to maintain state depends on the meaning and durability of data maintained.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Design patterns in WS:&lt;/span&gt;&lt;br /&gt;Client-side: business delegate, service locator, proxy&lt;br /&gt;Server-side: adapter, command, web service broker, façade&lt;br /&gt;&lt;br /&gt;Examples: &lt;br /&gt;WS-broker: JAXB used for generating DTOs from XML document; JAX-WS code encapsulation&lt;br /&gt;Adapter: an existing system should be exposed as a WS, providing WSDL configs etc. on the basis of current business logic &lt;br /&gt;Command: is used mostly in asynchronous WS.&lt;br /&gt;Façade: access to WS may be provided as a remote session façade&lt;br /&gt;Business delegate: calls the service locator when getting access to a service from client side&lt;br /&gt;Service Locator: UDDI, JAXR etc.&lt;br /&gt;Proxy: a proxy may provide access to several web services when routing requests in ESB; can hide the complexities of using remote objects; JAX-WS dynamic proxies&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;WSDL&lt;/span&gt;&lt;br /&gt;WSDL is a common format for WS description, specifies service signature, protocol and location. WSDL describes services bottom-up, starting with datatypes used and ending with location.&lt;br /&gt;Messaging styles:&lt;br /&gt;RPC/literal&lt;br /&gt;RPC/encoded&lt;br /&gt;Document/literal&lt;br /&gt;Document/encoded&lt;br /&gt;Document/encoded wrapped&lt;br /&gt;Literal means that standard XML schema is used for data binding and parsing; encoded means that custom set of rules is applied for this.&lt;br /&gt;To facilitate interoperability, the WS-I Basic Profile limits the use of the encoding (RPC-encoded or document-encoded) and encourages a literal formatting (document-literal or RPC-literal style). Thus, document-oriented service should use document-literal model etc.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;SOAP&lt;/span&gt;&lt;br /&gt;SOAP is a common protocol for WS. It is usually run over HTTP or HTTPS but is capable of binding to various transport protocols. SOAP message handlers are used for message encryptions, security, logging, auditing, caching, managing transactions etc. They are introduced declaratively in an XML-file on the server side.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JAX-WS&lt;/span&gt;&lt;br /&gt;JAX-WS proxies are dynamic, no stubs are needed.&lt;br /&gt;JAX-WS lets SOAP messages to be generated and parsed automatically. JAX-WS defines Servlet-based (also called JAX-RPC based) and EJB-based service endpoint models. The choice between those two relies only upon whether we are using Web or EJB container for WS requests preprocessing and business logic implementation. Web container doesn’t support concurrency out-of-box. EJB-endpoint also provides more fine-grained, method-level authorization.&lt;br /&gt;&lt;br /&gt;JAX-WS 2.0 provides also Dispatch API(client-side) and Provider API(server-side). Those are used for direct work with XML. Dispatch API supports fully dynamic service invocation, no stubs are required.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;UDDI and JAXR&lt;/span&gt;&lt;br /&gt;UDDI introduces service providers, service brokers and service consumers. Actual content is never stored in UDDI, it’s just a registry. JAXR for registries is analogous to JDBC for databases; it also provides a common API which is independent of underlying registry and adapters for each registry (UDDI, ebXML etc) &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Parsing mechanisms&lt;/span&gt;&lt;br /&gt;SAX – is used for large documents, allows processing on fly. However, may be used only for message consumption.&lt;br /&gt;StAX – the same as SAX but with writing ability. Moreover, one needs to know the structure of XML document before parsing.&lt;br /&gt;DOM – in-memory tree traversal programming model. Provides random access, reading/writing features, fine-grained control. May be applied with XPath. Platform-neutral and language-neutral.&lt;br /&gt;JAXB – you can’t use it if XML document has no XSD schema (DTD schema is not sufficient). Uses less memory than DOM. Hides XML complexities, however, limits some its features. Lets developers work directly with plain Java classes. Only since JAXB 2.0 Java-to-XML schema is supported. In JAXB 1.0 only XML schema-to-Java approach was supported.&lt;br /&gt;XSLT – provides a standard way for serialization of Java classes into XML. Is higher-level processing model, a complementary one.&lt;br /&gt;&lt;br /&gt;DOM, SAX and XSLT are available through JAXP API.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;QoS from WS point of view&lt;/span&gt;&lt;br /&gt;Reliability. Difficult to achieve because of unreliable transport protocol.&lt;br /&gt;Scalability. Web services scalability may suffer from huge amounts of XML processing. However, introduced asynchronicity may mollify this problem.&lt;br /&gt;Extensibility. WS are extremely extensible because of SOA principles applied in them.&lt;br /&gt;Performance. The main drawback is XML-parsing which is very consuming.&lt;br /&gt;Security. Message-level end-to-end security (data origin authentication). HTTPS (peer entity authentication). However, beside it WS do not have any inherent security; container-managed security can’t be propagated etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;WS clients and service activation&lt;/span&gt;&lt;br /&gt;Stubs – require code generation; are used for services with fairly static interfaces; easy to implement&lt;br /&gt;Dynamic proxy – do not require code generation; are fully supported in JAX-WS; are portable; may decrease performance&lt;br /&gt;Dynamic invocation interface – look-up for a service is performed at runtime; hard to implement; can be used when an incomplete WSDL is provided; slow performance&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Asynchronous WS&lt;/span&gt;&lt;br /&gt;MDB and JMS may be used to develop asynchronous WS. However, message delivery won’t be guaranteed because of HTTP. Moreover, JMS is only for J2J applications and has problems when passing through firewall.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-1701494669469927018?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/1701494669469927018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=1701494669469927018' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/1701494669469927018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/1701494669469927018'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/web-services-laaaaaarge-topic.html' title='Web services (a laaaaaarge topic) =)'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-5516294109716456334</id><published>2008-08-19T14:26:00.000-07:00</published><updated>2009-04-09T14:25:18.323-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Persistence</title><content type='html'>&lt;span style="font-weight:bold;"&gt;CMP versus BMP&lt;/span&gt;&lt;br /&gt;CMP provides better scalability and extensibility, faster development etc. However, if fine-grained persistence is needed or extreme efficiency is required, BMP would be a better choice.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JPA&lt;/span&gt;&lt;br /&gt;The most extensible and scalable. Provides distributed caching in the container. May be used outside the container as simple POJOs. May be even used in J2SE. Provides only optimistic locking.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JDO&lt;/span&gt;&lt;br /&gt;Supports OODBMS. Doesn’t support distributed caching out-of-the-box. Provides both pessimistic and optimistic locking. JDOs are also just annotated POJOs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;DAO with direct JDBC and Session Bean as a façade&lt;/span&gt;&lt;br /&gt;Is preferred either for extremely small applications with simple persistence logic or when working with huge amounts of simple data which needs to be processed efficiently. Provides better performance but low maintainability.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JSF+JPA&lt;/span&gt;&lt;br /&gt;JPA may be used outside the container as POJOs but then one must implement transactions, security etc by oneself. However, it may be ok, if all the work with database consists of simple retrieving of page content&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-5516294109716456334?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/5516294109716456334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=5516294109716456334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5516294109716456334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5516294109716456334'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/persistence.html' title='Persistence'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-3327702963810517724</id><published>2008-08-17T11:33:00.000-07:00</published><updated>2009-04-09T14:25:18.323-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Transactions</title><content type='html'>Transactions can be container-managed (CMT) or bean-managed (BMT)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CMT&lt;/span&gt;&lt;br /&gt;Mandatory -- transaction must be in effect when the method is called. Otherwise, an exception is thrown.&lt;br /&gt;Required – default behavior. Unless there is already a transaction, container creates new transaction.&lt;br /&gt;Requires new -- container dissociates an existing transaction, if there is one already, creates new transaction, finishes it, and then associates the old one again&lt;br /&gt;Supports -- if transaction context is available, it is used. Otherwise, method is invoked without any transactional context&lt;br /&gt;Not Supported -- if there is a transaction in current thread, container dissociates it, invokes the method and associates it again&lt;br /&gt;Never -- throws EJBException, if there is a transaction associated with a thread. Doesn't create any new transactions&lt;br /&gt;&lt;br /&gt;Session synchronized stateful beans support mandatory, required and requires new (TC is needed). Session synchronization is used by stateful session beans to cope with transactional exceptions.&lt;br /&gt;MDB support only required and not supported attributes (not aware of client’s TC)&lt;br /&gt;Stateless session beans support any transactional attribute.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;BMT&lt;/span&gt;&lt;br /&gt;BMT should be used for transactions in the Web tier because Web container doesn’t support CMT. &lt;br /&gt;BMT provide additional flexibility (for example, a transaction can last several method calls). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JTA supports only flat transactions, not nested ones.&lt;br /&gt;2PC (two phase commit) protocol – support of distributed transactions. Correctness of commit for each persistent store is checked in a centralized way before the commit is actually performed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-3327702963810517724?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/3327702963810517724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=3327702963810517724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3327702963810517724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3327702963810517724'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/transactions.html' title='Transactions'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-3498205685290166743</id><published>2008-08-17T06:26:00.000-07:00</published><updated>2009-04-09T14:25:18.324-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Security</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Common threats&lt;/span&gt;&lt;br /&gt;• Message alteration&lt;br /&gt;• Confidentiality&lt;br /&gt;• Falsified messages&lt;br /&gt;• Man in the middle&lt;br /&gt;• Principal spoofing&lt;br /&gt;• Forged claims&lt;br /&gt;• Replay of message parts&lt;br /&gt;• Replay&lt;br /&gt;• Denial of Service&lt;br /&gt;• Session hijacking&lt;br /&gt;• Repudiation&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Security challenges:&lt;/span&gt;&lt;br /&gt;• Identification and authentication&lt;br /&gt;• Data integrity&lt;br /&gt;• Data origin&lt;br /&gt;• Confidentiality&lt;br /&gt;• Message Uniqueness&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Implementation&lt;/span&gt;&lt;br /&gt;Security may be implemented programmatically or declaratively. J2EE applications are required to support HTTP basic authentication, SSL mutual authentication, and form-based login.&lt;br /&gt;&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;Application layer security.&lt;/span&gt; Provided by component containers. Is fine-grained. However, it is not transferable between applications.&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;Transport layer security.&lt;/span&gt; Is simple and widely used technology, usually with HTTPS. Tightly couples to transport protocol. Drawbacks: all-or-nothing protection (only some parts of message can’t be protected); point-to-point, not end-to-end security. Is applied for not large amount of systems communication.&lt;br /&gt;• &lt;span style="font-weight:bold;"&gt;Message layer security.&lt;/span&gt; End-to-end security. Is independent of protocol. However, performance may be reduced because processing is complex. Parts of messages may be secured. This type of security is commonplace in WS.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Signing, CA, public and private keys, and related stuff&lt;/span&gt;&lt;br /&gt;When one signs a jar using a private key, he puts the public key into it. To verify the owner of current pair of keys, CA is needed. The certificate is also placed in jar. However, you can’t be 100% sure about the real owner of the code inside. Signed jar can’t be modified, no classes can be added etc.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Applet Security&lt;/span&gt;&lt;br /&gt;There are 2 ways to make an applet trusted: to sign it or to put it into classpath directory of the program you are using to run it.&lt;br /&gt;&lt;br /&gt;Applets may be loaded in two ways: from the net and from classpath directory. Applets loaded over net are passed through byte code verifier which checks that classes conform to Java language. Classes loaded through classpath are granted extremely wide range of rights: they are allowed to read and write files, load libraries on the client, execute processes, exit JVM etc.&lt;br /&gt;&lt;br /&gt;Unsigned applets run in an applet sandbox. They are prevented from reading/writing files on the client, connecting to other hosts except that from which they were downloaded, manipulating other threads, starting other programs and using JNI, reading certain system properties, changing any properties, circumventing SecurityManager. No files can be stored on client, but they can be stored on server.&lt;br /&gt;&lt;br /&gt;Sandbox model doesn’t protect from DoS attacks because an applet can use any amount of memory&lt;br /&gt;&lt;br /&gt;Trusted applets may be permitted to read and write files, connect to sockets, communicate with devices etc. Concrete set of permissions is specified by security policy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Java Web Start security&lt;/span&gt;&lt;br /&gt;Java Web Start provides a compromise between ease of distribution of applets and power of applications. It is downloaded once and then can be run on the client and perform all the required updates etc.&lt;br /&gt;JWS sandbox is more flexible than applet sandbox in that it allows reading or writing files on the disk, accessing printers etc. under user’s control. With user permission JWS may gain control not only to JNLP but to whole Java API. Drawback is that it’s an “all-or-nothing” approach.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JAAS&lt;/span&gt;&lt;br /&gt;Is commonly used with J2SE, its scope is limited to a single JVM. Overlaps J2EE declarative security in some points. JAAS enables to perform authorization based not only on the code location but also on the user identity (user-centric model). Code-centric model is better suited for browser-based applications. JAAS may be used in J2EE application to customize the security of an individual application using pluggable LoginModules. JAAS also is pluggable and allows you not to care which underlying security system is used.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;WS-Security, XML encryption/ XML Digital Signature&lt;/span&gt;&lt;br /&gt;The intent of WS-Security standard is the ability to move security-related info with the message itself. It describes the usage of XML encryption/ XML Digital Signature. These two provide message-level security and allow securing only parts of messages thus promoting SOA. Differences between cryptographic algorithms used with WS-Security are well described here: http://grids.ucs.indiana.edu/ptliupages/publications/WSSPerf.pdf (not sure that it’s so important for the exam but some forums told it is)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;SAML&lt;/span&gt;&lt;br /&gt;SAML is an XML-based framework, which may be applied to provide for communicating user authentication data. It simplifies single sign-on and distributed transactions. SAML allows business entities to make assertions about the identity of a user. Alternative to cookies but transferable between DNS domains. Is used with web services. Protected from replay attacks by requiring the use of HTTPS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-3498205685290166743?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/3498205685290166743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=3498205685290166743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3498205685290166743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3498205685290166743'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/security.html' title='Security'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-2098994304180278957</id><published>2008-08-14T13:46:00.000-07:00</published><updated>2009-04-09T14:25:18.324-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>J2EE patterns – Business tier patterns</title><content type='html'>&lt;span style="font-style:italic;"&gt;This part of notes is, of course, relied heavily on and is widely using info from Core J2EE Patterns book. If any copyright issues occur, it may be removed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Business Delegate&lt;/span&gt;&lt;br /&gt;Business Delegate is a client-side proxy to remote service which decouples business and presentation tier and has usually a one-to-one relationship to Session façade. It shields client from business logic code changes and handles exceptions. Business Delegate is less widely applied in EJB 3.0 because of dependency injection. Business delegate doesn’t reduce the number of network calls because physically it is located in presentation tier. Increases maintainability, availability (can make automatic recovery without exposing the problem to the client, handles exceptions), performance(caching). It is usually used together with Service Locator pattern. Perfectly fits to B2B environment which use XML technologies.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Session Façade&lt;/span&gt;&lt;br /&gt;Is used to hide business tier complexity, reduce the complexity of client code, and provide coarse-grained access for clients. Introduces loose coupling, decreases network traffic. Session façade is used to expose Application Services, Business Objects and Composite Entities to clients. Improves manageability (centralized security management, transaction control). May be stateless or stateful. Session façade is usually unnecessary if EJB aren’t used. Example: Session beans act as a façade to entity beans.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Value List Handler&lt;/span&gt;&lt;br /&gt;Manages query execution, results caching and results processing, provides lists of dynamically constructed Transfer Objects by accessing the persistent store at request time. Provides caching, improves network performance. Allows deferring entity bean transactions. Used with DAO promotes separation of concerns. May be implemented as a stateful session façade. Example: maintain search results on the server side; search and iteration functionality.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Service Locator&lt;/span&gt;&lt;br /&gt;Encapsulates service lookup and creation. Improves performance (both client performance by caching and network performance by decreasing number of client lookups). Became obsolete with dependency injection. Abstracts complexity and provides code reuse. Creates a single point of control. May be used by many clients. Example: Business Delegate locates a Session Façade; JMS queues and topics location; WS location.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Transfer Object&lt;/span&gt;&lt;br /&gt;DTO is used to carry multiple data elements across a tier. Facilitates data exchange, improves response time. DTO makes interfaces more coarse-grained. If entity itself is used as DTO, code duplication is reduced. Drawbacks are issue with stale objects, synchronization and version control. The pattern became quite obsolete after EJB 3.0 but still may be used in some issues. Example: an entity contains a huge number of fields, but a method really needs only several of them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Transfer Object Assembler&lt;/span&gt;&lt;br /&gt;Prevents implementing business logic in the client, minimizes network overhead, reduces coupling. May be implemented as POJO or as Stateless Session Bean. Improves client performance (everything is assembled at the business layer). Difference from Composite entity: DTO Assembler combines DTOs from different sources, Composite Entity may create DTO from its own data. Problems and example are the same as for single DTO.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Application Service&lt;/span&gt;&lt;br /&gt;Centralizes reusable business logic across business tier components and services, provides background logic and architecture for Service facades (Session Facades which may use either POJOs or session beans), simplifying them. Avoids code duplication by extracting reusable logic, increases maintainability, introduces additional layer. May provide an intermediary function between presentation and business tier in non-EJB applications; access to email system, legacy system, WS. Example: Session Façade receives method calls, delegates their processing to Application Service. This service makes calls to any Business Objects, Web service broker, DAO, etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Business Object&lt;/span&gt;&lt;br /&gt;Separates business data and logic, being an object, which contains business logic and business state. Business Object may act as a façade to the objects it encapsulates. Promotes reuse, and increases maintainability. If application isn’t sophisticated, one can expose Business Objects directly to clients; otherwise, they should be used with Session Façade and Application Service. Promotes SOA (different services may be built on the top of Business Objects). It’s, however, overkill for small projects. Without Application Service Business Objects may get too heavyweight and bloated. Example: Business Objects usually represent such entities as Order, Customer, etc. They may be implemented either by POJOs or by Entity beans. &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Composite Entity&lt;/span&gt;&lt;br /&gt;Composite Entity is used to decrease the quantity of entity2entity queries. It is commonly used with Lazy Loading strategy, which helps to decrease network overhead. It is usually implemented by a parent Business Object and a set of its related components. Composite Entity improves maintainability and performance, makes entities more coarse-grained, reduces database schema dependency (hides the mapping). Example: a set of interrelated Entities act as a whole, being queried and updated together.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-2098994304180278957?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/2098994304180278957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=2098994304180278957' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/2098994304180278957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/2098994304180278957'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/j2ee-patterns-business-tier-patterns.html' title='J2EE patterns – Business tier patterns'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-5152427558403243175</id><published>2008-08-14T13:43:00.000-07:00</published><updated>2009-04-09T14:25:18.325-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>J2EE patterns – Integration tier patterns</title><content type='html'>&lt;span style="font-style:italic;"&gt;This part of notes is, of course, relied heavily on and is widely using info from Core J2EE Patterns book. If any copyright issues occur, it may be removed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Web Service Broker&lt;/span&gt;&lt;br /&gt;Provides access to services through XML and web protocols by introducing a new layer. Performance might decrease. Possible implementation strategies may include JAXB, JAX-WS, custom XML parsing etc. Example: you’ve got several WS written in different languages and you want to separate access code and mechanisms, choose only some required capabilities of their business interfaces, apply additional binding, formatting, parsing etc.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Domain Store&lt;/span&gt;&lt;br /&gt;This pattern is needed to separate persistence from your object model and avoid putting persistence details into business objects, which makes persistence transparent. Domain Store can be extremely effective with JDO or JPA. However, this pattern may be bad for a small project because implementing persistence framework by oneself is a complex task which should be judged very well. Another benefit: improved testability. Example: you’ve got a web-based lightweight application, where entities are used outside EJB-container. You need to implement persistence of a business model objects somehow. Entities have complex relationships, inheritance etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Service Activator&lt;/span&gt;&lt;br /&gt;Is used to invoke services, POJOs or EJBs asynchronously, to integrate pub/sub model. Not obvious point: it is used “to perform a business task which is logically composed of several business tasks” which may be run in parallel and require huge amount of processing. Service Activator may be also implemented as a standalone JMS listener. Example: an MDB receives messages from clients asynchronously and invokes the services required.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Data Access Object&lt;/span&gt;&lt;br /&gt;Separates data access code, provides transparent access to data, and abstracts data sources. DAO reduces code complexity in clients by separating persistence layer, reduces coupling, enables transparency etc. Simplifies database migration, provides uniform API for data access. Drawbacks: extra-design of DAO-hierarchy is needed; introduces complexities in design of a “bridge” between OO-model and JDBC RowSets. Commonly used with direct JDBC persistence strategy; in other case, Domain Store is used. Example: an application which is connected to several different databases. Persistence logic shouldn’t be intermingled with business logic but separated in an additional layer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-5152427558403243175?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/5152427558403243175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=5152427558403243175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5152427558403243175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5152427558403243175'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/j2ee-patterns-integration-tier-patterns.html' title='J2EE patterns – Integration tier patterns'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-6739463774728304221</id><published>2008-08-13T00:15:00.000-07:00</published><updated>2009-04-09T14:25:18.325-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>J2EE patterns – Presentation tier patterns</title><content type='html'>&lt;span style="font-style:italic;"&gt;This part of notes is, of course, relied heavily on and is widely using info from Core J2EE Patterns book. If any copyright issues occur, it may be removed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Intercepting Filter&lt;/span&gt;&lt;br /&gt;Facilitates pre- and postprocessing of a request, centralizes control, improves reusability, provides flexible configuration. Examples: loosely coupled SOAP message handlers; enqueueing different kinds of security, logging etc. filters in a chain to process a request; Acegi security implementation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;View Helper&lt;/span&gt;&lt;br /&gt;Allows encapsulating business logic related to view content but not related to presentation;  processes the business data. Fat clients and scriptlets are avoided; better reusability and role separation are provided. Improves maintainability. Java bean helper strategy is usually preferred to custom tag helper strategy because beans are more manageable, so less amount of code is required. However, custom tags are better when dealing with data formatting and flow control. Example: pattern should be used if scriptlets code embedded into JSP becomes too complex.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Front Controller&lt;/span&gt;&lt;br /&gt;Manages the handling of a request, including security services, delegates business processing, selects appropriate view, handles errors in a centralized way. Lets to avoid replication among many views, reduce the number of scriptlets. Servlet-front strategy is usually preferred to JSP-front strategy. Example: the application needs a centralized point of entry on the presentation layer which will later delegate responsibilities to other helpers and controllers. This point of entry will provide initial request handling and dispatching.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Application Controller&lt;/span&gt;&lt;br /&gt;Is used to centralize and modularize action and view management. Improves reusability. Front controller usually delegated responsibilities to Application controller in more complex applications. Example: a controller which is managing custom handling of SOAP messages and is using SAAJ.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Context Object&lt;/span&gt;&lt;br /&gt;Allows avoiding protocol-specific info outside of its relevant context, reduces coupling. May be used for communication between front controller and application controller. Improves reusability, testability and maintainability. Reduces constraints on interfaces (they are less tied to protocol-specific details), reduces performance (state is transferred). Example: security context which contains details about user authentification mechanism.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Service to Worker&lt;/span&gt;&lt;br /&gt;It is a combination of front controller, view helper and dispatcher, and main point is business logic, not view. Therefore, controller and dispatcher have more responsibilities, and view is just shown simply after having processed business data. Improves maintainability, code reuse etc. Used with &lt;span style="font-weight:bold;"&gt;Servlet-front strategy&lt;/span&gt;. Example: You’ve got a complex application with sophisticated business logic. However, a client can see only several JSP-pages with buttons and input fields.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Dispatcher View&lt;/span&gt;&lt;br /&gt;It is a combination of front controller, view helper and dispatcher, and main point is business view, not business logic. So, content retrieval and error handling are deferred until view processing. This strategy has a drawback: poor separation of business and presentation logic; but if business logic is simple and view processing is complicated, it is ok. Used with &lt;span style="font-weight:bold;"&gt;JSP-front strategy&lt;/span&gt;. Example: You’ve got a site of a design studio, full of complex layouts, animation, etc. The business logic, however, is very straightforward: just several CRUD operations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Composite View&lt;/span&gt;&lt;br /&gt;Creates an aggregate view from modular and atomic components. May be carried out by Java beans (not elegant, because scriptlets are introduced, but requires small amount of upfront work),&lt;span style="font-weight:bold;"&gt; custom tags&lt;/span&gt; (best and preferred strategy), standard tags (like jsp:include, not flexible) or XSLT. Improves code reuse etc. Both enhances and reduces maintainability (there are more components to maintain but all changes are centralized). Reduces performance (view generation at runtime). Example: pages are modular and contain many subviews which repeat throughout the application&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-6739463774728304221?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/6739463774728304221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=6739463774728304221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/6739463774728304221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/6739463774728304221'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/j2ee-patterns-presentation-layer.html' title='J2EE patterns – Presentation tier patterns'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-41147649728535331</id><published>2008-08-10T09:55:00.000-07:00</published><updated>2009-04-09T14:25:18.326-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>MDB, JMS, JCA and Legacy Connectivity</title><content type='html'>&lt;span style="font-weight:bold;"&gt;MDB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;MDB – stateless asynchronous message consumer.&lt;br /&gt;The only way to work with it is through messaging system, not directly.&lt;br /&gt;MDB do not have remote or local interfaces because they aren’t RPC-components. &lt;br /&gt;MDB provide a pull-model model of load-balancing which is more effective than push-based model of entity and session beans. Pull-based model is a model when each instance of MDB pulls “work” from the client when this instance is available. &lt;br /&gt;MDB don’t throw RemoteException. In general, they can throw exceptions but can’t return them back to the client in many cases, so a problem of “poison messages” appears (this problem may be solved, for example, by logging). &lt;br /&gt;MDB support only REQUIRED and NOT_SUPPORTED transaction attributes (those, which have no notion of client). If something goes wrong, CMT allows message delivery to be rolled back.&lt;br /&gt;MDB are single-threaded; however, concurrent processing is provided by using multiple instances of MDB, so one never knows the order in which messages are processed. This feature improves MDB scalability. &lt;br /&gt;MDB can be pooled.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JMS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JMS provides standard API to MOM, it is not a messaging system itself but an abstraction of interfaces. JMS doesn’t have built-into security, so there is no way to propagate security with JMS messages, therefore some kind of message-layer or transport-layer security should be used. JMS transactions are specific: production and consumption of the message can’t be part of the same transaction.(MDB do not run in the same transaction as the producer) JMS transactional support lasts only till the queue’s or topic’s entry point. JMS messages may be encrypted using SSL. JMS may use HTTP tunneling but it is better suited for message exchange within a firewall and integration of applications within one department.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JMS messaging modes:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Pub/sub&lt;/span&gt;. Based on topics. Push-based model. Allows durable subscription(subscribers receive even those messages which were sent to them while they were not active) Message delivery is guaranteed only for durable subscribers.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;P2P. &lt;/span&gt;Based on queues. Pull-based model (but may be turned into push-based). Message delivery is guaranteed for all subscribers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JCA&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JCA is the standard way to integrate JMS providers with J2EE application server using Resource Adapters. One needs JCA to put a message from non-Java producer into a JMS queue or topic. JCA is also used to access mainframe EIS. JCA solves infrastructure problems (resource pooling, transaction management, security, lifecycle management). JCA may work with non-relational databases. However, JCA introduces tight coupling, so it works best with small-scope integration problems and isn’t scalable.&lt;br /&gt;JCA defines several aspects (contracts) which J2EE-compliant application must provide: lifecycle management, transactions, work management, security, connection, message inflow and transaction inflow contracts.&lt;br /&gt;To connect to JCA EIS vendor provides pluggable resource adapter. JCA plugs this adapter into J2EE application server. (analogous to JDBC)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Examples of Legacy Connectivity and Integration:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;WS&lt;/span&gt; – You have to integrate your application with another one across the firewall. Applications are written in different languages and run on different platforms. Reliability is not a crucial point. However, end-to-end security support would be beneficial. The main requirement is to make the architecture extensible enough to be able to add new services as fast as possible and to provide loose coupling and SOA.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JMS&lt;/span&gt; – You are implementing an intracorporate system of placing orders between departments. After an order is placed, one of departments handles it and processes in an asynchronous way.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JCA&lt;/span&gt; – You’ve got a mainframe application with no access to legacy code. On the other side you’ve got a large J2EE system which is not planned to be changed and extended to WS. Infrastructure support (transactions, security, etc.) is a crucial point and tight coupling is not a problem. So, you have to integrate those applications somehow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-41147649728535331?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/41147649728535331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=41147649728535331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/41147649728535331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/41147649728535331'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/mdb-mdb-stateless-asynchronous-message.html' title='MDB, JMS, JCA and Legacy Connectivity'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-3177464862442452998</id><published>2008-08-10T06:05:00.000-07:00</published><updated>2009-04-09T14:25:18.326-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Protocols and related technologies</title><content type='html'>&lt;span style="font-weight:bold;"&gt;HTTP&lt;/span&gt;&lt;br /&gt;HTTP doesn’t support RPC, which led to the development of SOAP.&lt;br /&gt;Stateless, but state may be moved through URL rewriting or cookies. You can also use applets to maintain state.&lt;br /&gt;HTTP is unreliable. Widely used for WS (SOAP is run over HTTP)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;HTTPS&lt;/span&gt;&lt;br /&gt;HTTPS adds encryption, identification of parties and session state.&lt;br /&gt;Encryption used is only as strong as it is supported by the weakest side.&lt;br /&gt;SSL handshake is a mutual verification of client and server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;IIOP&lt;/span&gt;&lt;br /&gt;IIOP – protocol used by CORBA systems.&lt;br /&gt;RMI/IIOP is commonly used for EJB.&lt;br /&gt;Java applications can use IIOP in two ways: with RMI or with Java IDL.&lt;br /&gt;IIOP and JRMP allow tunneling because any port is ok for them and they haven’t got any default port.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JRMP&lt;/span&gt;&lt;br /&gt;JRMP is the default protocol for RMI.&lt;br /&gt;To interoperate with other languages JNI may be used by JRMP, but they are supported only inside the system.&lt;br /&gt;JRMP supports JAAS security and distributed garbage collection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CORBA&lt;/span&gt;&lt;br /&gt;CORBA is a technical standard. &lt;br /&gt;CORBA is usually used for integration of existing software written in different languages.&lt;br /&gt;ORB – object-oriented version of RPC.&lt;br /&gt;Java IDL – the most direct way to use CORBA in Java applications; IDL – CORBA specification for exposing an interface.&lt;br /&gt;RMI/IIOP also allows accessing CORBA.&lt;br /&gt;In CORBA objects are usually passed by reference which introduces tight coupling. But since CORBA 2.3 OBV (objects by value) were introduced which lets one to introduce SOA with CORBA.&lt;br /&gt;CORBA supports more languages than JNI.&lt;br /&gt;CORBA can’t be run over HTTP.&lt;br /&gt;CORBA may also provide asynchronicity, transactions and security.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RMI&lt;/span&gt;&lt;br /&gt;Objects are passed by value (or???). Any parameters passed by value through RMI/IIOP are passed just as a sequence of bytes and, therefore, may be read only by Java clients. So, you need either CORBA or WS to support multiple languages.&lt;br /&gt;Faster than JAX-RPC but less flexible.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Examples:&lt;/span&gt;&lt;br /&gt;RMI/IIOP – You’ve got 2 systems each running in a EJB-container and you have to make them interoperate.&lt;br /&gt;CORBA/IIOP with Java IDL– You’ve got a C++ application and a Java application. No other systems are planned for addition. You need support for transactions and security. Tight coupling is not considered a problem.&lt;br /&gt;RMI/JRMP with JNI wrappers – You’ve got several Java applications but you need to incorporate small amount of services written in another language into them.&lt;br /&gt;RMI/JRMP – You’ve got several distributed Java non-EJB applications which should work together. Distributed garbage collection would be a benefit.&lt;br /&gt;HTTPS – You need transport-level security and session management.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-3177464862442452998?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/3177464862442452998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=3177464862442452998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3177464862442452998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/3177464862442452998'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/protocols-and-related-technologies.html' title='Protocols and related technologies'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-5479410373574063520</id><published>2008-08-09T12:54:00.000-07:00</published><updated>2009-04-09T14:25:18.327-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Some points about EJB</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Choice between messaging and usage of RMI/IIOP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Messaging is preferable to mollify network overhead(when a lot of data is saved to database at the same time), to prioritize requests, provide better load balancing and run asynchronous processes. However, RMI/IIOP is better to perform transactional actions (an operation is a part of larger transaction), propagate security identity and is able to throw exceptions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Choice between Stateful and Stateless session beans&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Stateful session beans can cause input/output bottlenecks during passivation/activation. Callbacks (@PostActivate, PrePassivate etc.) are used, for example, for closing JDBC connections or releasing other resources bean has acquired. Before passivation all non-transient and non-serializable fields of a stateful session bean should be set to null. A bean involved in the transaction can't be passivated until the transaction ends. Stateless session bean can't by default be used by multiple clients concurrently(no support for multithreading). However, each next method call may be performed on another stateless bean because they are interchangeable.&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;&lt;br /&gt;GOF Design patterns in EJB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Flyweight: Bean pooling&lt;br /&gt;Facade: Stateful beans as a facade for entity beans&lt;br /&gt;Observer: MDB&lt;br /&gt;Memento: bean passivation; 2PC&lt;br /&gt;Proxy: Session bean acts as a proxy to Entity bean&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;EJB 3.0 and EJB 2.x interoperability&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;EJB 3.0 and 2.x are completely interoperable: EJB 3.0 can use EJB 2.x without any problems. EJB 2.x can’t use dependency injection when interoperating with EJB 3.0, instead they should use JNDI. They main problem one faces when migrating from EJB 2.x to EJB 3.0 is Entity beans migration (new entities are POJOs which support inheritance, etc., and may be run outside of EJB container, for example in Web container)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;New, managed, removed and detached state of Entities&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Removed beans are still associated with persistence context and have a persistent identity, they are just scheduled for removal.&lt;br /&gt;If you remove a new entity, any cascaded removes are also performed&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-5479410373574063520?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/5479410373574063520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=5479410373574063520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5479410373574063520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5479410373574063520'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/some-points-about-ejb.html' title='Some points about EJB'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-4295574742324411924</id><published>2008-08-09T12:48:00.000-07:00</published><updated>2009-04-09T14:25:18.327-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>Tiers, layers, common architectures</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CUser%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:595.3pt 841.9pt; 	margin:2.0cm 42.5pt 2.0cm 3.0cm; 	mso-header-margin:35.4pt; 	mso-footer-margin:35.4pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Обычная таблица"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Tiers:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Client&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Web&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Business&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Integration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Resource&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Layers:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Virtual platform (component API)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Application infrastructure (containers)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;&lt;span style="" lang="EN-US"&gt;Enterprise&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:city&gt;&lt;span style="" lang="EN-US"&gt; services (operating system and virtualization)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Compute and storage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Networking infrastructure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Performance &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: minimize the number of network calls, control the boundaries of certain parts of the system, perform resource pooling and caching, introduce optimistic locking, save session state on the server, use Session façade, tune pool size. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: use pessimistic locking, use XML for EJB-EJB communication, activation/passivation, XML parsing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Scalability&lt;/span&gt;.&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Can be vertical(increasing capacity) or horizontal(adding servers). Vertical is cheaper and doesn’t increase system’s complexity; however, it introduces single point of failure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: adding more servers, choose a right level of transaction isolation, correct transaction management as a whole, better separation of concerns (tiering), using a connection pool, caching, asynchronous interaction&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: incorrect life cycle management, misapplication of stateless and stateful beans; ambiguous use of heavyweight components, client-server architecture&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Reliability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: horizontal scalability, pessimistic locking, guaranteed message delivery, stateful session bean replication&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: optimistic locking, dirty reads, ignorance of concurrent threads (for instance, injecting EntityManager in a servlet), HTTP protocol&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Availability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: introducing a cluster, hardware redundancies, asynchronous interaction, load balancing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: network latency and breakage, hardware failover&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Extensibility&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: effective OO design, code reuse, refactoring, patterns; multitier architecture; Web Services; loose coupling, JCA, JMS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: N+1 problem; tight coupling; access to legacy applications, databases, registries etc. without standard frameworks; ineffective Web tier design&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Maintainability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: facades, separation of concerns, declarative instead of programmatic ways to manage security, transactions, persistence etc.; usage of container, connectors etc., Composite Entity, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: code duplication, BMT, BMP, client-server architecture, direct SQL usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Manageability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: single point of access/control, logging&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: additional tiers, many servers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Security&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to improve: HTTPS, firewalls, authentication, end-to-end security, encryption&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Ways to decrease: point-to-point security, HTTP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-4295574742324411924?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/4295574742324411924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=4295574742324411924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/4295574742324411924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/4295574742324411924'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/tiers-layers-common-architectures.html' title='Tiers, layers, common architectures'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245708558540583378.post-5551869665295678172</id><published>2008-08-09T01:04:00.000-07:00</published><updated>2009-04-09T14:25:18.327-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SCJP'/><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='SCWSD'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='SCEA'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='exam preparation'/><title type='text'>1st message =)</title><content type='html'>Hi everybody,&lt;br /&gt;I'm preparing now for the Sun Certified Enterprise Architect exam which I'm planning to take in the end of August. Here I just wanna to put some of my notes on points which I consider be useful for reviewing.  These notes do not pretend to be complete and don't cover the whole material on any of the topics. If you've got something to add, you are welcome. =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4245708558540583378-5551869665295678172?l=jeyana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeyana.blogspot.com/feeds/5551869665295678172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4245708558540583378&amp;postID=5551869665295678172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5551869665295678172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245708558540583378/posts/default/5551869665295678172'/><link rel='alternate' type='text/html' href='http://jeyana.blogspot.com/2008/08/1st-message.html' title='1st message =)'/><author><name>jeyana</name><uri>http://www.blogger.com/profile/05499664686512681242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
