127 . In EJB 2.0 what is the Component interface?
- The interface that Message-Driven Beans must implement
- There is no component interface in EJB 2.0
- The new name for the Home interface
- The new name for the Remote interface
128 . You are working on a new application that will help your company co-ordinate sales data across different departments. The aim is to have everyone access the same sales data at all times. This project needs to be finished as soon as possible and you have bought some third party code to speed up the development process. The code has been signed using a digital certificate and packaged in a jar file?
What do you know about it? (Note: Digital certificates have been provided that have been signed by a trusted Certificate Authority)
Choose the one below:
- The jar file contains no malicious code
- The jar file was signed by the 3rd party vendor
- The jar file contents may contain malicious code
- Someone impersonating the 3rd party vendor may have signed the jar file
- The code is fully tested and performs the task it was designed for
129 . You have been contracted by a movie memorabilia company to set up an online shop. The company buys bulk goods from movie sets (stage props, costumes, gadgets etc), splits them into single items and then auctions them. The company used to hire sports halls or community centers to auction items in a traditional manner. They predict that by moving to an online solution they will reach a wider audience and make a greater profit despite the initial investment that the new system will involve?
What is the most suitable initial design in the list below?
Choose the one below:
- The business logic will be handled in a Servlet
- The business logic will be handled in a Stateful Session Bean
- Use Container Managed Transactions
- Use Bean Managed Transactions
- The customer will be represented wth an Entity Bean
- There is no need for a customer bean as a customers interaction with the site is just business logic and will be handled in the Servlet/Stateful Session Bean
- Use Container Managed Persistence
- Use Bean Managed Persistence
- The sale items will be represented with an Entity Bean
- The sale items will be stored directly on a database
130 . You have an application that is running in a DMZ that your company has set up. There are two firewalls, the first filters out packets based on destination ports other than port 80 (allows standard HTTP requests). The second filters out packets based on the origin IP address (only allows company IP addresses through). Can you connect to the application running in the DMZ from your Home computer?(Note: The application running in the DMZ is on port 80)
True/False?
Choose the one below:
- True
- False
131 . The Enterprise JavaBean 2.0 specification has introduced the notion of local Clients. What are Local Clients and why were they introduced?
- Local Clients should be used when the web server is running on the same machine as the application server
- Local Clients should be used when Session Beans need to communicate with Entity Beans.t;Beans in the same Virtual Machine should use local Clients
- Local Clients have been introduced to make testing code easier
- Local Clients have been introduced to improve maintainability
- Local Clients have been introduced to improve performance
- Local Clients should be used when the database is running on the same machine as the application server
132 . Which of the following offers an accurate description of Message-Driven Enterprise Beans?
- Message-Driven beans are just a new way of describing a JMS message. This has been formalized with the EJB 2.0 specification
- A Message-Driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously
- A Message-Driven bean is an enterprise bean that allows J2EE applications to process messages synchronously
- A Message-Driven bean is used when you need to interact with messaging systems other than JMS
- A Message-Driven bean is like a Session Bean except that if the server is busy it will put the Message-Driven beans’ method requests in a queue and execute them one at a time to reduce the load on the Application Server
133 . What’s the biggest difference between Message-Driven Beans and Entity and Session Beans?
- There is no difference in structure between Message-Driven Beans and Entity and Session Beans. They all have Home, Remote interfaces and a bean class
- Message-Driven beans don’t have a Home interface
- A Message-Driven bean is different from Session Beans because its state is persisted
- Clients don’t access Message-Driven beans through interfaces
134 . When should you use Message-Driven Beans?
- If you need to send any JMS message
- When you need to use an external service such as a credit card validation service and performance is essential
- When you need to send JMS messages asynchronously
- When you need to send JMS messages synchronously
135 . You are developing an application that will have to support a huge number of users. You are worried about the performance of the application because you need to use many Entity Beans. A work colleague has suggested using the Value Object design pattern?
What is the pattern and how will it benefit you?
Choose the one below:
- A snapshot of the state of an Entity Bean at a particular time
- An object that is used instead of an Entity Bean. For example if you were going to use a Customer bean you would create a Customer Value Object and the Application Server would use this instead. A Stateful Session Bean would control it
- An object that is used instead of an Entity Bean. For example if you were going to use a Customer bean you would create a Customer Value Object and the Application Server would use this instead. A Stateless Session Bean would control it
- There is no such thing as a Value Object design pattern
- There is a Value Object design pattern but it would not be appropriate to use it here
- A Value Object is the state of an Entity Bean that is kept in memory by the Application Server (Its state is periodically persisted.)
- A Value Object is the state of an Entity Bean that is kept in memory by the Application Server (Its state is not persisted and the data becomes stale after a while.)
136 . Your have been contracted by a company to upgrade their online shopping application. Their site sells health care insurance to customers at huge discounts. The process of buying insurance is complicated. They have however tried to simplify it as much as possible for the customer. When the customer arrives at their site to register, they fill out a 40-question questionnaire covering basic health and lifestyle information. The answers are then used for selecting the most appropriate level of insurance. (Each customer does NOT get a custom health care insurance agreement; they get the most suitable one out of a choice of 30). The customer then has the opportunity to purchase the insurance within seven days before the quote becomes void?
Based on the rough description of the system which of the following is the most suitable design? (Note: This question should be based upon the EJB 2.0 specification)
Choose the one below:
- The Customer should be an Entity Bean
- The business logic should be represented with a Stateful Session Bean
- The business logic should be represented with a Servlet
- The system should use CMT
- Should use BMT
- The Health Plan should be an Entity Bean that supports local clients
- The Health Plan should be a Stateful Session Bean
- The Health Plan should be a Stateful Session Bean that supports local clients
- There is no need for Customer Bean as there is no need to store the customers details just the Health Plan they bought
- The Customer should be an Entity Bean that supports local clients
137 . What are the benefits of synchronous messaging?
- Less coupling between the sender and receiver
- Network doesn’t have to be available
- Does not block the sender
- Good for transaction processing
138 . Can you use BMT (Bean Managed Transactions) with Entity Beans?
True/False?
Choose the one below:
- True
- False
139 . How has Container-Managed Persistence Changed from EJB 1.1 – 2.0?
- There has been no change with CMP but BMP has changed
- The performance of CMP has been improved so it no now more efficient than BMP
- The Bean class is now an abstract class
- You no longer need a deployment descriptor
- CMP doesn’t exist in EJB 2.0 because BMP out performs CMP
- You define the fields to be persisted in the Remote interface
- You define the fields to be persisted in the Home interface
140 . What are the benefits of the J2EE Blueprints Fast Lane Reader design pattern and when should it be used?
- When you the performance of an application is essential and you need to perform lots of read/write actions
- Should be used when reading large amounts of read only data
- Increases maintainability
- Should be used when you need to access data that becomes stale very quickly
- Can reduce the amount of code needed
- Increases the amount of code needed
141 . In which of the following situations would you use the Observer pattern?
- When you need to have objects notified of events but you don’t know which objects would have such needs, or if you will need to add more objects to receive such notification, at a later date
- You want one object to monitor when the state of another object but you don’t want the object being monitored to need to send any messages regarding its state
- When the instances of your class can be use interchangeable and you want to reduce the number of instances created in order to improve performance
- You are building an online auction site to sell rare and collectable toys. You want customers to be notified of bids on items they are bidding for in as close to real time as possible. You would use the Observer pattern to notify the customer objects of changes in the auction object
- When you need to co-ordinate state changes between other objects by using one object
142 . You need to access a complex object in a recursive way…building the object from other objects. This is an example of which pattern?
Choose the one below:
- Abstract Factory
- Factory Method
- Builder
- Composite
- Recursive Builder
143 . When would you use the Flyweight pattern?
- When you need classes to be notified of events but you don’t know which classes or if you will need to add more at a later date
- When the instances of your class can be used interchangeably and you want to reduce the number of instances created in order to improve performance
- When the instances of your class cannot be used interchangeable and you need to convert them so that they are interchangeable
144 . You are currently designing your own Desktop Publishing application, as you have not found any that do exactly what you want with existing applications. As part of the design you are using a Controller to which you send all GUI requests. Not all objects can process the same commands. For example you can’t select the spell check tool when an image has the focus. To stop any possible errors you would like to filter out some of the messages as they are passed from these objects to the Controller object?
What pattern could you use?
Choose the one below:
- Firewall
- Proxy
- Adapter
- Observer
- Chain of Responsibility
- Filter
145 . When would you use the Mediator pattern?
- When you need to co-ordinate state changes between other objects by using one object
- When you need to add functionality to a class without changing its interface
- When you need create a separation between abstractions and classes that implement those abstractions
- You need a class that will be used in lots of different applications where the logic will only change slightly
146 . A prospective employer is describing the existing architecture of a solution that is currently in production. He says that it’s a 3-tier system with 3 clustered web servers; a server for the Oracle database with the business logic implemented using PL/SQL scripts?
What is true about this system?
Choose the one below:
- This solution has fat clients
- This solution has thin clients
- There is a good separation of business logic
- The solution has good Scalability
- There is a poor separation of business logic
- The solution has poor scalability
147 . Your have been contracted by a company to help them improve the performance of their sales application. You have suggested that the hardware the application is currently deployed on (2 web servers and a database server) be migrated to 3 web servers, an application server and a database server (all on different machines.) You assure them that all the software re-writes needed will be well worth it in the end?
What are the characteristics of your suggested architecture?
Choose the one below:
- Fat Clients
- Thin Clients
- Good separation of business logic
- Good Scalability
- Poor separation of business logic
- Poor scalability
- There is no difference in the separation of business logic
148 . Your boss is raving about the new 3-Tier architecture that your company’s sales application will be deployed on. He says that this architecture will solve all the existing problems?
Is he right, or does a 3-Tier architecture have the potential to introduce any new problems?
Choose the one below:
- A Fat Clients
- B Thin Clients
- C Poor scalability
- D Poor manageability
- E Reduced performance
- F Reduced separation of business logic
- G Single point of failure
149 . You have written an application to allow customers to reserve tables at their favourite restaurants. In return your company receives 10% of whatever the customer spends at the restaurant. At the moment, the application is being run on a single Apache web server using PERL and CGI scripts for presentation and business logic with a separate server for the Sybase database containing the restaurant details?
What are the most notable weaknesses of this architecture?
Choose the one below:
- Fat Clients
- Thin Clients
- Scalability
- Potential Network bottlenecks
- Performance
150 . You have just bought a brand new dual processor server with over 3 Gigabytes of memory, the fastest server in its class. This server will host Apache Web server (shipped with the Oracle Database) and an Oracle 8i database?
What are the most notable weaknesses of this architecture?
Choose the one below:
- Scalability
- Manageability
- Security
- Performance
151 . When should Java IDL be used?
- When performance is essential (Performance is more important than scalability)
- When accessing RMI servers
- When servicing requests from RMI clients
- When accessing existing CORBA servers
- When servicing requests from CORBA clients
Answers
127 : 4 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.Message-Driven beans don’t implement any interfaces in EJB 2.0. The Component interface is the new name for the Remote interface as introduced in the EJB 2.0 specification.Remote Interface (Component Interface in EJB 2.0): Defines the Bean’s business methods. The Remote Interface extends javax.ejb.EJBObject.Home Interface: Defines the Bean’s life cycle methods – creation, location and removal. The Home Interface extends javax.ejb.EJBHome. Note that the create method is optional for Entity Beans. This is useful when you do not want to clients to be able to insert data into the database.
128 : 3 is correct.
Explanation:
All you actually know is that the code has been signed using the 3rd party vendors private certificate. You don’t know that it was actually signed by the 3rd party vendor. For example if the certificate was copied or stolen then there is no guarantee that the thief hasn’t distributed code signed with the stolen certificate. The jar file may contain malicious code or it may not, that is all you can guarantee. Just because code is signed doesn’t mean it is fully tested and does what it was supposed to do. Choice 5 is therefore incorrect.
129 : 2,4,5,7 & 9 is correct.
Explanation:
This is question is really 5 mini questions. If the business logic is put into the Servlet you are creating Fat clients with presentation and business logic tightly coupled. Therefore it is more appropriate to use a Stateful Session Bean especially since the Bean can be used in the Session Façade pattern (See below). The site is an online auction site with bids being placed at different times. This implies that transactions will need to be handled at a very fine level of granularity therefore Bean Managed Transactions is the most appropriate choice.
The customer and sales items both need to be persisted so they should be implemented as Entity Beans. The Entity Beans (customer and sales items) would not be complicated objects so Container Managed Persistence would be the better choice.Session Façade:A client should never”talk” directly to an Entity EJB. Instead a Session to Entity pattern called a Session-Façade should be used. As the name suggests, this pattern is based on the GoF Façade pattern. The Session Facade provides a simple interface to a complex subsystem. The simple interface is the Session Bean and the Complex subsystem is the Entity Bean. The client talks to the Session Bean, which in turn communicates with the Entity Bean.
130 : 1 is correct.
Explanation:
DMZ stands for Demilitarized zone. To set up a DMZ you need two firewalls and you create 3 separate regions. The different regions are the internet, DMZ (in the middle) and the third is your network. You would have a server in the DMZ that is accessible to both the public and your network. The internet may not access your network but they can access the server in the DMZ. Your network must access the internet through the server in the DMZ.The key to this question is that you are not trying to connect to an application within the second firewall that filters out requests based on IP address. So you could definitely connect to the application from home.A Useful link:http://www.saintrochtree.com/network-advices/000004.htm
131 : 3 & 6 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.Prior to the Enterprise JavaBean 2.0 specification all Bean clients were seen as remote clients. This meant that if a Session Bean needed to talk to an Entity Bean inside the same Virtual Machine it would still need to make a remote call. This obviously had a direct impact on performance. In EJB 2.0 Enterprise Beans can now treat other beans in the same VM as local clients. Local Clients can access the beans through its local and local home interfaces.Remote clients use pass-by-value but Local clients use pass-by-reference.For more information please see:http://java.sun.com/products/ejb/2.0.html
132 : 2 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.As stated in choice 2 a Message-Driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously. Choice 3 is incorrect because messages are sent asynchronously. Choices 1, 4 and 5 are all factually incorrect. For more information about Message-Driven beans see below.The following is taken from:http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts5.htmlA message-driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously. It acts as a JMS message listener, which is similar to an event listener except that it receives messages instead of events. The messages may be sent by any J2EE component–an application client, another enterprise bean, or a Web component–or by a JMS application or system that does not use J2EE technology. Message-driven beans currently process only JMS messages, but in the future they may be used to process other kinds of messages.
133 : 2 & 4 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.Choice 1 is incorrect, Message-Driven beans don’t have Home or Remote interfaces, they just have a bean class. The state of Message-Driven beans is not persisted like Entity beans. So choice 3 is incorrect.The following is taken from:http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts5.htmlThe most visible difference between message-driven beans and session and entity beans is that clients do not access message-driven beans through interfaces. Unlike a session or entity bean, a message-driven bean has only a bean class.
134 : 3 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.Choice 2 is incorrect, Message-Driven beans will not increase the performance of a service. Choice 4 is the other way around and choice 1 is factually incorrect.The following is taken from:http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts5.htmlSession beans and entity beans allow you to send JMS messages and to receive them synchronously, but not asynchronously. To avoid tying up server resources, you may prefer not to use blocking synchronous receives in a server-side component. To receive messages asynchronously, use a message-driven bean.
135 : 1 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.Every time you access an Entity Bean there is a significant overhead, as the call must go across the network and through the container to access the bean. One way to reduce the number of calls you need to make to Entity beans is by using the Value Object pattern. A Value Object (VO) is a snapshot of the state of an Entity Bean at a particular time. The idea is that a client will require more than one value from an Entity bean so instead of making several calls to an Entity Bean a Value Object is created containing all of these values. This Value Object is downloaded by the client so they can make the same calls only this time locally and directly on the bean. A Value Object is normally implemented as a JavaBean and is made immutable because there is no data synchronization (the JavaBean only provides getter methods).
136 : 2,4,6 & 10 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.The data that needs to be persisted are the customer data and the Customer’s Health Plans data (which one out of the 30 different plans.) Although the process of buying health care insurance sounds complicated (40-question questionnaire) the data that actually needs to be stored is very simple (customer id, health plan id etc). This means that CMT is more appropriate than BMT (choice 5 is therefore incorrect.) There is no benefit in putting the business logic in a Servlet, there still needs to be a Session Bean to talk to the Customer and Health Plan Entity Beans. It is also possible to use the Entity Beans local client interfaces (introduced in EJB 2.0) which will improve the performance of the application.
137 : 4 is correct.
Explanation:
Choices 1, 2 and 3 are all describing asynchronous messaging. Synchronous, tightly coupled communication between distributed components: This is the model of CORBA, RMI, EJB and so on. The programming model is called Remote Procedure Call (RPC).Asynchronous, loosely coupled communication between components: This is the Message Oriented Middleware or MOM model. The programming model is called Messaging.
138 : 2 is correct.
Explanation:
Entity Beans can only use Container Managed Transactions (CMT) but Session Beans can use either CMT or Bean Managed Transactions (BMT). CMT is less flexible than BMT and can’t handle transactions at the same level of granularity as BMT.The following is taken from:http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Transaction3.htmlIn an enterprise bean with container-managed transactions, the EJB container sets the boundaries of the transactions. You can use container-managed transactions with any type of enterprise bean: session, entity, or message-driven. Container-managed transactions simplify development because the enterprise bean code does not explicitly mark the transaction’s boundaries. The code does not include statements that begin and end the transaction.http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Transaction4.htmlIn a bean-managed transaction, the code in the session or message-driven bean explicitly marks the boundaries of the transaction. An entity bean cannot have bean-managed transactions; it must use container-managed transactions instead. Although beans with container-managed transactions require less coding, they have one limitation: When a method is executing, it can be associated with either a single transaction or no transaction at all. If this limitation will make coding your bean difficult, you should consider using bean-managed transactions.
139 : 3 is correct.
Explanation:
Note: This type of question will not be in the EJB 1.1 version of the SCEA but is likely to be in the EJB 2.0 version of the SCEA.The following is taken from:http://developer.java.sun.com/developer/technicalArticles/ebeans/EJB20CMP/Prior to the EJB 2.0 specification, a client stored and accessed persistent data via an entity bean’s instance variables. With the introduction of the 2.0 specification, you can designate instance variables to be container-managed persistence fields (cmp fields) or container-managed relationship fields (cmr fields). You define these cmp and cmr fields in the deployment descriptor. You retrieve and set the values of these cmp and cmr fields using public get and set methods defined in an entity bean. Similar to the JavaBeans model, you do not access the instance variables directly, but instead use the entity bean’s get and set methods to retrieve and set these instance variables. (An enterprise bean does not declare these instance variables.) Furthermore, you use the deployment descriptor to specify the relationships between entity beans. These relationship specifications serve as the schema definition, so that when the bean is deployed, the bean relationships may be captured in a relational database. For example, a relationship between two beans specified in the deployment descriptor may appear as a foreign key relationship in a relational database. Choice 1 is incorrect because CMP has been reviewed in EJB 2.0. Choices 6, 7 and 4 are incorrect as specified in the above paragraphs. The performance of CMP has improved but not to the point where it is more efficient than BMP so choice 2 and 5 are incorrect.
140 : 2 & 5 is correct.
Explanation:
from:http://java.sun.com/blueprints/patterns/FastLaneReader.htmlSometimes applications access data in a tabular fashion, such as when browsing a catalog or a list of names or when exporting data in batches for use elsewhere. This kind of data access is usually read-only. In such situations, using entity beans to represent persistent data incurs overhead and provides little benefit. Entity beans are best for coarse-grained access to individual business entities, and are not effective for read-only access to large quantities of tabular data. The Fast Lane Reader design pattern provides a more efficient way to access tabular, read-only data. A fast lane reader component directly accesses persistent data using JDBCTM components, instead of using entity beans. The result is improved performance and less coding, because the component represents data in a form that is closer to how the data are used. Choice 6 is incorrect because the Fast Lane Reader can reduce the amount of code needed. Choice 3 is not the most appropriate answer because although there is less coding involved it does not have a direct affect on the maintainability of the application. (It may even reduce maintainability by increasing the coupling between the data store and business logic). Choice 1 is incorrect because the Fast Lane Reader pattern should only be used with Read Only data. Although choice 4 is feasible it is not the most appropriate choice.
141 : 1 & 4 is correct.
Explanation:
The observer pattern is used to notify an objects dependents’ when that object changes state. Choice 5 is a description of the Mediator pattern. Choice 3 is incorrect because the Observer pattern does not reduce the number of instances you need to create. Choice 2 is almost correct except that messages are sent when the object being monitored changes state.Observer – (GOF 293): “Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notifies and updated automatically.”Mediator – (GOF 273):”Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.”
142 : 4 is correct.
Explanation:
This is a bit of a trick question; you would assume that you would need to use a creational pattern such as the Builder or Abstract Factory to do this <Prototype could be applicable as well, if we are not building a family or an aggregate object, but simply prototyping existing objects>. The key is that you need to recursively build a composite object from other objects. This is an example of the Composite pattern. There is no such pattern as the Recursive Builder so choice 5 is incorrect.Composite – (GOF 163): “Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.”The other patterns were:Abstract Factory – (GOF 87): “Provide an interface for creating families of related or dependent objects without specifying their concrete classes.”Factory Method – (GOF 107): “Define an interface for creating an object, but let subclasses decide, which class to instantiate. Factory Method lets a class defer instantiation to subclasses.”Builder – (GOF 97): “Separate the construction of a complex object from its representation so that the same construction process can create different representations.”&&Sanjay”need to build a complex object” almost certainly suggests that we are talking about a creational pattern. I understand the tricky nature of the question, however I was wondering if the question needed to be reworded as”accessing a complex object” or something. Has been updated
143 : 2 is correct.
Explanation:
Choice 1 is a description of the Observer pattern. Choice 3 is incorrect because the instances of your class can be used interchangeably in the Flyweight pattern.Flyweight – (GOF 195):”Use sharing to support large numbers of fine-grained objects efficiently.”
144 : 2 is correct.
Explanation:
Firewall and Filter are not design patterns. In this scenario what you are essentially trying to do is filter all packets that don’t meet a certain set of requirements. This behavior is just like a Proxy server dropping packets from certain IP address etc.Proxy – (GOF 207): “Provide a surrogate or placeholder for another object to control access to it.”The other patterns:Adapter – (GOF 139):”Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.”Observer – (GOF 293):”Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notifies and updated automatically.”Chain of Responsibility – (GOF 223):”Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.”
145 : 1 is correct.
Explanation:
The Mediator pattern allows you to co-ordinate state changes between many objects by using one mediator object. Choice 2 is a description of the Decorator pattern. The Strategy pattern is described in choice 4 and choice 3 describes the Bridge pattern.Mediator – (GOF 273):”Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.”
146 : 2,5 & 6 is correct.
Explanation:
The key to this question is the fact that the business logic has been implemented using PL/SQL stored procedures. This means the business logic is on the same server as the database and therefore this is a 2-tier system not a 3-tier system as your prospective employer suggests. There is a very tight coupling between the data store and the business logic this has a direct affect on the potential scalability of this system.When you think of 2-Tier systems you would normally associate them with Fat clients. However as the business logic has been implemented using PL/SQL scripts this system will have thin clients making choice 1 incorrect. Choice 3 is incorrect because the business logic and data store are tightly coupled. This tight coupling will have a direct affect on scalability. You may not be able to horizontally scale this system (adding more machines); vertical scaling might be easier (add more memory and CPUs.) But even with vertical scaling you would always run the risk of a network bottleneck making choice 4 is incorrect as well.
147 : 2,3 & 4 is correct.
Explanation:
The system you have suggested they migrate to is a 3-tier system. The characteristics of a 3-tier system are thin clients, good separation of business logic and good scalability. This is due to the fact that each tier is separate from the other (for example it would be possible to change the data store without affecting the business logic.)Choice 1 is incorrect; the suggested system has thin clients, the business logic residing on the application server, in the middle tier. Since there is a good separation of business logic, choices 5 and 7 are incorrect. Choice 6 is incorrect the 3-tier nature of the system makes it very scalable.
148 : 4 is correct.
Explanation:
The only problem a 3-Tier architecture could have is the potential for poor manageability. The separation of tiers creates thin clients and distributes business logic processing. However because of the distributed nature of the servers, there could be manageability problems. With J2EE solutions however, the potential for such problems is limited because J2EE tiers and layers have very well defined roles and responsibilities. Choice 1 is incorrect because Fat clients are a characteristic of 2-Tier architecture where the business logic is implemented on the client side. Thin clients are good. Therefore choice 2 is incorrect. A 3-Tier architecture has excellent scalability, including horizontal scalability, making choice 3 incorrect. It’s possible to argue that a 3-Tier architecture may not perform as well as a single machine containing your web server, business logic and database. However as soon as you introduce a significant amount of users a 3-Tier architecture would out perform a single machine. Therefore choice 5 is correct. Choice 6 is incorrect because a 3-Tier architecture actually increases the separation of business logic. Choice 7 is incorrect because a”single Point of failure” is not a problem that a 3-Tier architecture introduces. Although it may have a single point of failure, with careful design you can avoid such pitfalls easily. This is much harder to do with 2-Tier architecture and impossible with 1-Tier architecture.
149 : 1,3 & 4 is correct.
Explanation:
The architecture being described here is a 2-Tier architecture. The key as to whether this system has fat or thin clients is that there is no reference to stored procedures. Generally if the business logic resides on the server it is in the form of stored procedures. We therefore assume that all the business logic is in the PERL and CGI scripts. The reason for poor scalability is due to the tight coupling of business logic and client presentation (fat clients). There is always a potential of a network bottleneck in 2-Tier architectures because all requests have to go to one data store.Choice 2 in incorrect as there is no mention of stored procedures in the scenario we assume that the business logic has been implemented in PERL and CGI scripts on the client side. Performance is not the best answer here and so choice 6 is incorrect.
150 : 1 is correct.
Explanation:
You can only vertically scale this system (add memory, CPUs etc). As soon as this system comes under a heavy load you would have to separate the Apache web server from the Oracle database and build up a cluster of web servers. This would be hard to do as the Oracle database and Apache web server are so tightly coupled.Note: A system can still be scalable even if it is only one machine providing it has a good separation of the business logic, data store and client presentation. Choice 2 is incorrect because this system would be easy to manage as everything is in one place. Choice 3 is incorrect, you don’t need to authenticate yourself to other machines or send traffic across the network to other machines. Choice 4 is incorrect because although the system would perform really well under light traffic as soon as it had heavy loads of traffic the performance would drop dramatically.
151 : 4 is correct.
Explanation:
The following is taken from:http://java.sun.com/j2se/1.3/docs/guide/idl/index.htmlThis is a fundamental question and it’s important to understand the distinction between these two ways of integrating the Java programming language with CORBA. Java IDL is for CORBA programmers who want to program in the Java programming language based on interfaces defined in CORBA Interface Definition Language (IDL). This is “business as usual” CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL. Although CORBA can slightly out perform RMI that is not a reason to use Java IDL so choice 1 is incorrect. In choices 2 and 3 you would use RMI-JRMP and inc choice 5 you would use RMI-IIOP.