52 . You are working for a web design company and one of your clients would like to convert their website that currently uses Perl and CGI scripts over to a language that is easier to maintain and reuse. Their website is a sports betting website where the customer is able to logon and place bets on a variety of different sporting events?
What would you replace this with?
Choose the one below:
- A JSP/Servlets
- B JSP/Servlets/EJBs
- C JMS
- D ASP
53 . You are in charge on converting an existing web based solution over to the appropriate J2EE technology. What should you use? The website offers the customers price comparisons on a variety of different products. Revenue is generated by click through sales when the customer has found the best price?
Choose the one below:
- JSP, Servlets
- JSP, Servlets, EJBs
- Applets, EJBs
- No need to change it PERL/CGI scripts is the best solution
54 . Your 3-tier application has been deployed in a production environment and has been running smoothly for over 3 months. However recently due to a Television campaign you’re getting 3 times the normal volume of traffic. To cope with this you decided to introduce Round-Robin load balancing?
How is round robin load balancing going to help with the extra traffic?
Choose the one below:
- Splitting requests evenly amongst all back end servers
- The proxy sits behind the backend servers monitoring the performance of each one. When it notices one is being used too much it will automatically forward requests to a different server
- Splitting requests amongst all back end servers depending on the amount of spare CPU time each server has available
- A technique used to target certain requests to certain backend servers, e.g. All Servlet requests from one server. All static HTML from another
55 . A Fortune 500 company wishes to add new functionality to its existing sales system and has contracted you as the lead architect for the project. The legacy system has been written in C++ and they wish to keep this system running although they may switch over to full Java solution later, depending on the performance of the new extra functionality?
How will connect to this legacy system?
Choose the one below:
- Wrap the application using JNI and make it accessible using RMI
- Rewrite the C++ code in Java. This shouldn’t be too hard because it’s converting from one object-orientated language to another
- Use a screen scraper
- Use CORBA to talk to the C program then get the CORBA to talk to the RMI server
56 . The IT company you are working currently doesn’t offer the facility for customers to buy PCs bundled with printers. Luckily they have just struck a deal with another printer company. The list of printers they offer is maintained in a database that runs on one of the printer companies servers. You need to connect to this database however you don’t have a JDBC driver that you can install on the server?
The database server does have an ODBC driver installed on it. How do you connect to the database?
Choose the one below:
- You can’t, change the data store
- Get the printer company to write a web page that you can pass SQL requests to. (You would simply send SQL queries as POST requests and the output would be the ResultSet) This should be implemented securely using SSL with client and server authentication
- Wrap some JNI access code around the OBDC driver then connect using JDBC
- Don’t implement the solution using Java
- Send the database requests as JMS method calls
- Use the JDBC-OBDC bridge driver
57 . A work colleague has been describing a mainframe application that your company uses to maintain their sales data. He says that the next application you will need to design will involve screen scraping, as he can’t see how else the connection to the mainframe will be possible?
What is screen scraping?
Choose the one below:
- A plastic tool to get ice off a car windscreen
- A program that interacts with a mainframe passing requests from the users directly to custom written code that you have added in the mainframe
- A program that emulates a mainframe terminal and passes user input to the mainframe
- A program that’s supplied by the mainframe for Java programs to interact with
- Your colleague is wrong. It will be quite easy to connect directly to the mainframe using Java
- A program that uses JNI to access the mainframe
- A program that use JMS to send messages to the mainframe. Note this only works if the mainframe has a message server built into it
58 . You are working for a company with a worldwide presence; their offices are spread across many countries and over many computer networks. Virtual private networks have been set up to increase security?
What are Virtual Private Networks and where are they created?
Choose the one below:
- A network created between two other networks (these are not located in the same place, geographically). Encryption and Authentication are used in the VPN. Normally the VPN is a network on top of an untrusted network (like the Internet)
- The area between two firewalls. You let traffic from the Internet into this area (through the first firewall) but not through the second firewall (to your secure network)
- The secure (inner) network as described in answer 2
- A network created between two other networks (these are not located in the same place, geographically). Encryption and Authentication are NOT used in the VPN. Normally the VPN is a network on top of a trusted network (like the Internet)
59 . What is object mapping?
- The process of converting a class diagram to Java code
- A program that emulates a mainframe terminal and passes user input to the mainframe
- The process of building object wrappers around Java interfaces. This allows the legacy system to interact with your Java application
- The process of building object wrappers around legacy interfaces. This makes the legacy system available in an OO fashion
60 . You are the lead architect for a project that will require you interfacing with existing CORBA systems. You are planning to use Java IDL to integrate with these other systems?
Which of the following statements about Java IDL are true?
Choose the one below:
- Allows Java to use CORBA
- Should be used when most of your new Java applications will be entirely Java based
- Should be used if you have already been using CORBA for a while and wish to carry on with some CORBA systems
- Java IDL has nothing to do with CORBA. To communicate with CORBA you will need to use JNI (Java native interface) and J2C (Java 2 CORBA)t+Same as E expect you won’t need to use JNI
- Java IDL should be used when servicing messaging requests from CORBA clients
61 . You are designing an Enterprise Application to provide a way for customers to buy products from many companies through one standard site. The application servers you have use the EJB specification 1.1. You have a customer bean and are not sure whether to use CMP or BMP?
When should you use CMP?
Choose the one below:
- When performance is essential and you are storing standard data types
- When performance is not essential and you are storing standard data types
- When performance is essential and you are storing complex data types
- When performance is not essential and you are storing complex data types
62 . You’ve written all the UML diagrams you need for your companies online store. Other developers and architects have approved them. Now you are deciding which Enterprise Beans will use Container Managed Persistence (CMP) and which will use Bean Managed Persistence (BMP)?
When should you use BMP?
Choose the one below:
- When performance is essential and you are storing standard data types
- When performance is not essential and you are storing standard data types
- When performance is essential and you are storing complex data types
- When performance is not essential and you are storing complex data types
63 . Your company has won a contract with a major supermarket company to allow customers to do their grocery shopping online. As this will involve a huge number of shoppers you have decided to opt for a J2EE solution?
When creating the Enterprise Beans to be used in this application what components do you need?
Choose the one below:
- A Home interface, A Remote Interface and a class that implements either the SessionBean or EntityBean interfaces
- A Home interface and a class that implements either the SessionBean or EntityBean interfaces
- A Remote interface and a class that implements either the SessionBean or EntityBean interfaces
- A Remote interface and a class that implements the EnterpriseBean interface
- An EJBObject interface, a Remote interface and a class that implements either the SessionBean or EntityBean interfaces
- An EJBObject interface, a Home interface and a class that implements either the SessionBean or EntityBean interfaces
64 . What is the difference between Stateful session beans and stateless session beans?
- Stateful session beans are pooled and Stateless session beans aren’t
- A Stateful session bean can persist its state through a server crash but a Stateless session bean can’t
- A Stateful session bean can remember its state with a client, like a conversation but a Stateless session bean can’t
- A Stateful session bean uses a Primary Key interface to maintain persistence
65 . What is the difference between stateful Session beans and Entity beans?
- Stateful session beans can survive a server crash but Entity beans can’t
- Entity beans can survive a server crash but Stateful session beans can’t
- Session beans are typically used to make calls on Entity beans
- Entity beans are typically used to make calls on Session beans
66 . You have an application that will be used for customers to buy service engineers time and extend warranties online. You have several different Enterprise Beans in this application for example, Customer, Warranties, CreditCardValidation etc. It’s a long time since you’ve coded EJBs (normally your time is spent designing applications at a higher level) and you’ve forgotten which methods should go in which interface?
What methods do you put in the Remote interface?
Choose the one below:
- Defines create(), find(), remove(Object) methods
- Defines signatures of EJB’s business methods
- Defines the persistence of the bean, e.g. how to persist etc
- Defines all methods that the client can call on the EJB
- You don’t need a Remote interface for an EJB. An EJB consists of a Home interface and an EJBObject interface
67 . You are designing an Enterprise Bean to represent a customer in your new application. You have many methods for this EJB for example:createAccount()deductAmount()create()find()?
Which of these methods needs to go in the Home Interface and what is it used for?
Choose the one below:
- Defines create(), find(), remove (Object) methods
- Defines signatures of EJB’s business methods
- Defines the persistence of the bean, e.g. how to persist etc
- Defines all methods that the client can call on the EJB
- The createAccount(), deductAmount() methods need to go in the Home interface as it defines the business methods
68 . Select the most appropriate use for an Entity Bean?
- Store state for a particular client
- To store data permanently such as financial data
- Store state for any client, not any in particular
- Provide a service to the client
69 . You’ve managed to work out what the next big online shop will be way ahead of everyone else, and are currently designing it. Although the design is still in a rough stage and you have yet to secure sponsors to take it into production you have already decided on some of the Enterprise Beans that you will need. You know you will need a customer EJB, Shopping basket EJB, another EJB to be used when accessing data on a legacy system?
You know you will need many more but what would be an appropriate use for a Stateless Session Bean?
Choose the one below:
- To represent a shopping basket
- Provide a service to the client
- Store state for a particular client
- To access data on a legacy system
70 . In a Catalog Enterprise Bean, (used in an online sports shopping site) you have code that will be executed when ejbPassivate() and ejbActivate() are called. The code is used to perform basic house keeping tasks?
You need to know when the code will execute so which of the following statements are true?
Choose the one below:
- ejbPassivate() is called prior to passivation
- ejbPassivate() is called immediately after passivation
- ejbActivate() is called prior to activation
- ejbActivate() is called immediately after activation
71 . You have never worked with J2EE application servers before and are about to release your first 3-Tier application. Your company already has a strong customer base so you expect a huge volume of traffic over the first few days of the launch. You’re not to sure how your application server will cope with all the customers but a colleague reassures you that the Enterprise beans are pooled and the performance of the system will be fine?
What are the benefits of bean pooling?
Choose the one below:
- Improves response time between client and bean
- Means you need fewer instances of the beans and therefore increases scalability
- Means you need fewer instances of the beans but this does nothing for increasing scalability
- Means you keep more instances of the beans in memory but this improves performance of the Application server ten fold
72 . Which of the following statements are true with regards to bean pooling?
- The EJB specifies how many instances to pool at deployment time
- Although bean pooling improves performance it doesn’t offer any advantages in Scalability terms
- If your server has enough memory you should avoid bean pooling
- The application server depending on the beans usage decides the number of instances to pool
73 . Its not just Stateless Session beans that are pooled, Entity beans are as well?
True/False?
Choose the one below:
- True
- False
74 . When should RMI over IIOP be used?
- RMI over IIOP is used all the time with standard RMI
- When performance doesn’t matter
- When you are dealing with a pure Java system, no legacy systems etc
- When RMI is used with Enterprise Javabeans
75 . As part of your online shopping site you need customers to be able to pay for their goods securely. You have decided that you will use SSL with 128bit encryption to transmit the credit card details?
What port number does HTTPS run on and can it be configured to run elsewhere?
Choose the one below:
- 8443 and yes it can run elsewhere
- 8443 and no it can not run elsewhere it must run on this port
- 443 and yes it can run elsewhere
- 622 and yes it can run elsewhere
- 443 and no it can not run elsewhere it must run on this port
76 . You are designing an application that will use JRMP over IIOP. The Network engineers at your company would like to know what port you intend to use to access the internet and other networks so that they can make it available on the companies firewall?
What port do you ask for?
Choose the one below:
- 443
- 535
- 1099
- 8443
- 80
Answers
52 : 2 is correct.
Explanation:
The key to this question is that the site offers the facility to place bets online. Therefore transactions are involved and this means that Enterprise Java Beans need to be used. It is very hard to implement transactions with just Servlets and JSPs. Hence choice 2 is correct.Choice 1 is incorrect because transactions are involved. JMS is the messaging package of the J2EE and therefore 3 is incorrect. And choice 4 well, enough said!
53 : 1 is correct.
Explanation:
The key to this question is that the revenue is generated by click through sales; this implies that there are no transactions involved. If transactions were involved then you would use EJBs as well.Choices 2 and 3 are incorrect because there are no transactions involved in this application. PERL/CGI scripts are harder to maintain than Java code so choice 4 is not the best option.
54 : 1 is correct.
Explanation:
Round-Robin load balancing is the process of splitting requests evenly irrespective of the request type (i.e. SSL, JSP, HTML). If you have 3 servers as the first request comes in it goes to the first sever, second request to the second server and the third request to the third server. As the fourth request comes in the process starts again and so this request is forwarded to the first server.Choices 2 and 3 are not descriptions of any known load-balancing technique. Choice 4 is a description of reverse proxy load balancing. This is generally used when you have servers with different amounts of CPUs and Memory. You might have some really powerful servers just to be used for SSL sessions and others to handle static html. Using this will maximise the performance of your application.
55 : 1 is correct.
Explanation:
JNI stands for Java Native Interface and is used to allow Java to communicate with programs written in languages like C. In effect you are wrapping the C code to make it available to Java. For example you will wrap a C method called debitAccount(int amount) with a similar Java method, the Java method will just call the C method. This means you can now make the method accessible via RMIChoice B is incorrect because this is not what customer wants, you must stick to the requirements. It would be inappropriate to use a screen scraper here so choice 3 is incorrect. Although choice 4 might be possible, to get this to work would take far more work than is actually required. You would need to get the C and CORBA programs working first then try and interface CORBA and RMI, which is not necessary, in this case.
56 : 6 is correct.
Explanation:
The key to this question is that with the JDBC-ODBC you are not connecting to the database directly you are connecting to the ODBC driver instead. So it doesn’t matter what the database is as along as there is an ODBC driver available.Choice 1 is incorrect because it can be done. Although choice 2 may work it is not the best solution, the JDBC-ODBC Bridge is the best solution. You don’t need to wrap JNI code around the ODBC driver to connect to it. Hence choice 3 is incorrect. Choice 4 is incorrect because it is possible to connect to the data source using Java. Choice 5 is incorrect because there is no mention of any Message server in the question and this is not suitable technology for the job.
57 : 3 is correct.
Explanation:
A screen scraper emulates a mainframe terminal. Basically the screen scraper logs on to the mainframe like a normal user and sends requests to the mainframe and then reads the response. The problem with a screen scraper is that if you change any of the mainframes code there is always the possibility that the screen scraper will stop working.Choice 1 maybe true but it’s not the right kind of screen scraper! Choices 2 and 6 require that you have access to the mainframes source code. Screen scrapers are written as and when they are needed, the mainframe vendor does not supply them so choice 4 is incorrect. Your colleague is right. Therefore choice 5 is incorrect. Choice 7 is incorrect because although you can communicate with mainframes via JMS the process is different from screen scraping.
58 : 1 is correct.
Explanation:
The answer given in choice 1 explains what a Virtual Private Network is (VPN). Choice 2 describes a DMZ; choice 3 the local area network in the DMZ and choice 4 is incorrect because encryption and authentication are used in the VPN.
59 : 4 is correct.
Explanation:
Object mapping is used when accessing legacy systems. You need access to the legacy system’s source code in order to do this.Choice 1 sounds plausible but is incorrect. Choice 2 is a description of a screen scraper. There is no need to build object wrappers around Java interfaces. Choice 3 describes the opposite. Hence choice 3 is incorrect.
60 : 1 & 3 is correct.
Explanation:
The following is taken from:http://java.sun.com/j2se/1.3/docs/guide/idl/index.htmlJava IDL adds CORBA (Common Object Request Broker Architecture) capability to the Java platform, providing standards-based interoperability and connectivity. Java IDL enables distributed Web-enabled Java applications to transparently invoke operations on remote network services using the industry standard IDL (Object Management Group Interface Definition Language) and IIOP (Internet Inter-ORB Protocol) defined by the Object Management Group. Runtime components include Java ORB for distributed computing using IIOP communication.Choice 2 is incorrect because you should use RMI-IIOP instead of Java IDL. Choices 4 and 5 are not true as Java IDL adds CORBA capability to the Java platform. Choice 6 is incorrect because Java IDL shouldn’t be used when servicing requests from CORBA clients and the reference to messaging is a red herring.
61 : 2 is correct.
Explanation:
Please note that this is referencing EJB1.1This is a time dependent question as technologies have changed. When Sun wrote the EJB specification 1.1 Application Servers weren’t very efficient at generating SQL used for persistence and it used to be recommended that you use BMP instead. However App Servers have improved and some would argue that CMP is now more efficient than BMP. In the SCEA guidebook by Cade it says BMP will out perform CMP. When the exam is updated to EJB 2.0, the answer to this question would probably change.Choice 1 is incorrect because BMP can be more efficient than CMP. CMP cannot cope with mapping complex data types to a database very efficiently. Hence choice 3 is incorrect. Even if performance is not an issue, it is still recommended that you use BMP when storing complex data types. Therefore choice 4 is incorrect.
62 : 1,3 & 4 is correct.
Explanation:
Please note that this is referencing EJB1.1This is a time dependent question as technologies have changed. When Sun wrote the EJB specification 1.1 Application Servers weren’t very efficient at generating SQL used for persistence and it used to be recommended that you use BMP instead. However App Servers have improved and some would argue that CMP is now more efficient than BMP. In the SCEA guidebook by Cade it says BMP will out perform CMP. When the exam is updated to EJB 2.0, the answer to this question would probably change.Choice 3 is incorrect because using Container Managed Persistence will increase the portability of the Enterprise Bean and should be used wherever possible.
63 : 1 is correct.
Explanation:
You need a Home interface that has create() and find() methods, a Remote interface to define your business methods, and a class that implements either the SessionBean or EntityBean interfaces.Choice 2 is incorrect because you also need a Remote interface. Choice 3 is incorrect because you also need a Home interface. Choice 4 is incorrect because you need the Home interface and a class that implements either the SessionBean or EntityBean interfaces. Choices 5 and 6 are incorrect because you don’t need an EJBObject interface.
64 : 3 is correct.
Explanation:
An example use for a stateful session bean would be a shopping basket because it maintains its state. However a stateless session bean can’t and instead should be used as a service e.g. credit card validation. A stateful session bean cannot survive a server crash, as none of its data is permanently stored like Entity beans.Choice 1 is incorrect because Stateless session beans are pooled. Choice 2 is incorrect because a stateful session bean cannot survive a server crash. Choice 4 is incorrect because the data in a stateful session bean is not stored on a database and therefore there is no Primary Key interface for stateful session beans.
65 : 2 & 3 is correct.
Explanation:
Entity beans represent data on a database whereas session beans represent workflow. It is very expensive to create Entity beans and the code can become quite complicated. Hence you should use the Session-Façade pattern, where the customer talks to a Session bean which in turn talks to the Entity bean.Choice 2 is incorrect because session beans cannot survive a server crash and in choice 4 the description is the other way around.
66 : 2 & 4 is correct.
Explanation:
The Remote interface is used to define all of the methods that can be called by the client on the Enterprise Bean. If you try and call a method that exists in the Enterprise bean class but hasn’t been defined here you will get a RemoteException.The methods in choice 1 are defined the Home interface. Choice 3 describes information that would be found in the deployment descriptor and application server. Choice 5 is incorrect because a remote interface (that implements javax.ejb.EJBObject) is required.
67 : 1 is correct.
Explanation:
The Home interface defines the create(), find(), and remove() methods.The Remote interface is used to define all of the methods that can be called by the client on the Enterprise Bean. If you try and call a method that exists in the Enterprise bean class but hasn’t been defined in the remote interface, you will get a RemoteException.Choice 2 is incorrect because these are methods defined in the Remote interface. Choice 3 describes information that would be found in the deployment descriptor and the application server. Choices 4 and 5 describe the Remote interface.
68 : 2 is correct.
Explanation:
The key to this question is”select the most appropriate” there are a two possible right answers. (2) Is the most correct because it has the word permanently in the answer. Entity beans represent data on a database. It might be possible to argue that (1) is also right because maybe that is a customer Entity Bean storing their address and personal details. But there is no reference to permanent data storage. Hence (2) is the better answer.Choice 3 would require either a stateless or stateful session bean. The reason it could be either is because it says”not any particular client”. Choice 4 would typically require a stateless session bean.
69 : 2 is correct.
Explanation:
Stateless session beans can’t remember which client they were last talking to and any data they might hold is not saved in a database. Stateless session beans are used to provide a service. E.g. credit card validation.Choice 1 is incorrect because a shopping basket would require state (a Stateful Session Bean). Choice 3 would require a Stateful Session Bean or Entity Bean depending on whether the data needed to be permanently stored for that client. Although choice 4 is possible this isn’t the most appropriate use for a stateless session bean.
70 : 1 & 4 is correct.
Explanation:
The descriptions in choices 2 and 3 are the wrong way round.
71 : 2 is correct.
Explanation:
Bean pooling is just like database connection pooling. There is no point having a few thousand instances in memory when you could get by with 50. When a bean is in a pooled state it is not associated with any particular client.The following are wrong because:You could argue that by bean pooling it reduces the load on the application server and this indirectly improves the response time. However this choice (1) is not the most appropriate. Choice 3 is incorrect because bean pooling does increase scalability. Choice 4 is incorrect because you keep fewer instances of the beans in memory.
72 : 1 is correct.
Explanation:
You can say how many instances should be pooled at deployment time.Choice 2 is incorrect because bean pooling does increase scalability. There is no need to avoid bean pooling and if you didn’t do it the amount of memory you would need would be far too expensive. Hence choice 3 is incorrect. The number of beans to pool is set at deployment time. Hence choice 4 is also incorrect.
73 : 1 is correct.
Explanation:
Yes they are both pooled to reduce the load on the Application server.
74 : 4 is correct.
Explanation:
The following is taken from:http://java.sun.com/j2se/1.3/docs/guide/idl/jidlFAQ.htmlRMI-IIOP – If you are writing most of your new applications using the Java programming language, but need to maintain legacy applications written in other programming languages as well, you will probably want to use Java RMI with its IIOP compiler option.Choice 1 is incorrect because JRMP is the standard for RMI. Whether you use IIOP or JRMP is irrelevant in terms of performance. Hence choice 2 is incorrect. You should use standard JRMP in the case choice 3 describes.
75 : 3 is correct.
Explanation:
As a standard HTTPS runs on port 443 but it can be configured to run elsewhere. With web servers such as Tomcat the SSL port is 8443.
76 : 3 is correct.
Explanation:
JRMP runs on port 1099 as standard although it is possible to run it on a different port.Choice 1 is the standard SSL port number. IIOP uses port 535. Web servers such as Tomcat use the port 8443 for SSL. And choice 5 is the standard HTTP port. Although you wish to access the internet you are not making http requests.For more information please refer to the following URL:http://www.iana.org/assignments/port-numbers