1. Trang chủ
  2. » Công Nghệ Thông Tin

Programming Business Logic using EJB

83 646 4
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

1. WORA stands for _________________. [0.5] a) Write Once Read Always c) Work Once Run Afterwards.

Programming Business Logic using EJB 1. WORA stands for _________________. [0.5] a) Write Once Read Always c) Work Once Run Afterwards. b) Write Once Run Anywhere d) Wrong Out Read Again. 2. Which of the following is not an advantage of the multi-tier application model. [1.0] a) Providing user interaction, using client-side applications. c) Platform independence b) Programming business logic d) Relying on backend services 3. Which of the following statements is not true regarding EJB. [1.5] a) It is container dependent. c) It collects all the common elements present during the development of server-side processes and applications. b) It is server-side component architecture. d) Transaction oriented components are written in Java. 4. The client side is more complex than the server side [0.5] a) True b) False 5. A ______________________ in EJB is an object that is deployed on any EJB server. [0.5] a) Component c) Chunk b) Container d) Logic 6. Which of the following statements is false with respect to a distributed application. [1.5] a) Processing is distributed across multiple networked computers. c) It allows for a more accessible business system. b) It is based on a two-tier application development d) The user interface is on one network while the business rules and database is on another network 7. ___________________ is not a model for developing distributed applications. [1.0] a) DCOM c) RMI b) COM d) CORBA 8. Generally, ________________________ objects do not implement any interfaces. [0.5] a) remote c) public b) distributed d) local 9. Which of the following statements does not describe a component. [2.0] a) It is an object. d) It can be described as a chunk of logic. b) Performs a set of functions. e) It has an independent existence of its own. c) Can consist of one or more classes. 10. Server side component architecture manages the components during ____________. [1.0] a) Compilation c) logic building b) Development d) run time 11. Which of the following lines pertaining to local objects are true. [2.0] a) They are created in a totally different JVM. c) References are obtained directly. b) They are accessed using interfaces. d) They always implement a remote interface. 12. ______________________________________ enhances reusability and portability. [1.0] a) Client side component architecture. c) Server-side component architecture. b) JVM d) Remote objects. 13. The J2EE platform does not contain middleware services. [0.5] a) True b) False 14. Match the following: 1. EJB a) It acts as a relational database 2. JDBC b) It allows asynchronous communication 3. JTA c) It is a component technology 4. JMS d) It is used for reliable transaction support [2.5] a) 1 – a, 2 – b, 3 – c, 4 – d c) 1 – d, 2 – b, 3 – a, 4 – c b) 1 – c, 2 – a, 3 – d, 4 – b d) 1 – d, 2 – c, 3 – b, 4 – a 15. Multiple connections from the client are taken care of by the __________________. [0.5] a) Remote reference layer c) Skeleton layer b) Stub layer d) Transport layer 16. The ______________ is an implementation of CORBA. [1.0] a) Enterprise Java Beans c) Java Transaction API b) Java Messaging Service d) Java IDL 17. Socket communication is ideal for exchanging files or small amounts of data. [0.5] a) True b) False 18. The RMI defines the difference between _______________ and _______________ objects. [1.0] a) public/global c) remote/local b) distributed/concentrated d) random/definite 19. The ______________________________ supports communication between the stub and skeleton. [1.5] a) remote reference layer c) transport layer b) stub layer d) Architecture 20. Method calls by the client, to the remote object leads to an invocation of a method on the _________which in turn passes control to the _________________ layer. [1.5] a) transport layer/top c) remote reference layer/lowermost b) stub/underlying d) transport layer/next 21. Providing a user-defined interface can change the implementation of the transport layer. [2.0] a) True b) False 22. A _____________ must be acquired to the remote object, before a client can invoke a method on that object. [1.0] a) tag c) connection b) reference d) loop 23. Arrange the Events given below in the correct sequence. 1) The skeleton contacts the remote registry. 2) The object method is called. 3) Invocation of the stub. 4) Result is passed to the client object. Forwarding the request the reference layer. [2.5] a) 2 – 5 – 3 – 4 – 1 c) 3 – 5 – 1 – 2 – 4 b) 1 – 2 – 3 – 4 – 5 d) 4 – 1 – 5 – 2 – 3 24. All distributed systems consist of _________________ and ___________________. [1.0] a) remote objects/random objects c) stubs/skeletons b) transport layers/reference layers d) JTA/JMS 25. The _______________________ is responsible for unicast point-to- point invocation. [0.5] a) remote reference layer c) skeleton layer b) stub layer d) transport layer 26. At present, ____________ is used by RMI to communicate between the ____________ transport layer and the _________________ transport layer. [1.5] a) IPX/PX, client, user c) Remote access, remote, network b) NetBEUI, proxy, host d) TCP/IP, client, server 27. The remote registry is stored on the client. [0.5] a) True b) False 28. Which of the following classes belong to the java.rmi package. [1.0] a) MarshalledObject c) Naming b) RegistryHandler d) Skeleton 29. The ___________________ does not have any methods. [1.0] a) MarshalledObject d) Remote Interface b) RMISecurityManager e) Naming c) RegistryHandler 30. Arrange the order in which a remote object will be created and registered. 1.Create the stub and skeleton classes 2.Create the Remote interface 3.Create and register the Remote object 4.Create a class that implements the Remote interface. 5.Copy the Remote interface and stub file to the client. [2.0] a) 1 – 2 – 3 – 4 – 5 c) 5 – 1 – 3 – 4 – 2 b) 3 – 2 – 1 – 5 – 4 d) 2 – 4 – 1 – 5 – 3 31. The interfaces and classes of the __________________ package are used to handle and register remote objects by name. [1.0] a) java.rmi.server package c) java.rmi.package b) java.rmi.registry package d) java.rmi.activation package 32. Remote objects are always referenced through an interface. [0.5] a) True b) False 33. The client object can call all the methods of the remote object. Do you agree with this statement? [1.0] a) Agree b) Disagree 34. Every method of the remote interface must throw a ______________________. [0.5] a) getData() c) getDataNum() b) RemoteException d) interface 35. The statements given below define the implementation of the Remote Interface. Which of these is not true. [2.0] a) Classes that implement the remote interface generally extend the ‘UnicastRemoteObject’ class. c) The implementation class also implements all the methods present in the remote interface. b) The implementation class does not require a constructor. d) The implementation class has a main() function. 36. How many errors are there in the following code snippet. import java.rmi.; public interface MyEx extends Remote { String getDataNum(); String getData(int a) throws RemoteException } [2.5] a) None c) Five b) Four d) Two 37. Which of the following lines of code will be required to register the class ‘Myex’, where the name of the host machine is stored in ‘hostName’ and the name used by the client to call the remote object is ‘myobj’. [2.5] a) Myex instance = new Myex(); Naming.rebind(“//”+hostName+”/myobj” , instance)); c) Myex = new Myex(); Naming.(“hostName”, instance)); b) DistributedExImpl instance = new DistributedExImpl(); Naming.rebind(“//”+hostName+” /DistributedExample”, instance)); d) Myex instance = new Myex; Naming.rebind(“//”+hostName+”/myobj”, instance) 38. The _______________ compiler is used to register the class that implements the remote interface, with the remote registry. [1.0] a) rmi c) rmic b) class d) java 39. When the compiler is executed for the ‘Myex.class’ program, then the following files are generated. (Choose the correct answer/s). [1.5] a) Myex.java c) Myex.class b) Myex_Stub.class d) Myex_Skel.class 40. The command required to start the RMI registry is ____________________ [1.5] a) start rmiregistry c) execute rmiregistry b) rmiregistry d) begin rmiregistry 41. For listening to incoming requests the RMI registry uses port ___________. [1.0] a) 1024 c) 1099 b) 65535 d) 1020 42. The client is able to directly code the container. Do you agree with this statement? [0.5] a) Agree b) Disagree 43. Connection pooling and security management are examples of _____________________. [0.5] a) Multi-tier applications. c) Components. b) Application servers d) Middleware. 44. The ______________________ meets the low-level run time execution environment required by EJB applications. [1.0] a) Container provider c) Server provider b) Bean provider d) Deployer 45. Match the following. 1.Bean provider a) It takes prewritten components and deploys them 2.Application assembler b) It provides reusable components 3.Deployer c) It is similar to the container provider [2.5] 4.Server provider d) It is used for putting the components together a) 1 – a, 2 – b, 3 – c, 4 – d c) 1 – d, 2 – c, 3 – b, 4 – a b) 1 – b, 2 – d, 3 – a, 4 – c d) 1 – c, 2 – a, 3 – d, 4 – b 46. The EJB ___________ consists of the EJB ____________, which in turn contains the EJB ___________. [1.5] a) components/container/server c) container/server/components b) server/container/component s d) components/server/container 47. The EJB architecture consists of the following tiers. [1.5] a) Client d) Database b) Container e) EJB server Home interface 48. The bean accesses the database using ______________. [0.5] a) ODBC c) JDBC b) MS-SQL d) server 49. Interaction with the bean by the client is done using the _____________ interface and the ___________ interface. [1.0] a) home/remote c) user/EJB b) database/server d) random/client 50. The ___________________ acts as a buffer between the bean and the outside world. [1.0] [...]... perform? a) Persistence c) Security b) Business methods d) Concurrency [1.5] 107 All the remote interface types extend _ interface a) javax .ejb. EJBHome c) javax .ejb. EnterpriseBean b) javax .ejb. EJBObject the [1.0] d) java.rmi.Remote 108 Which of the following is not a method of the EJB object a) getEJBHome() c) isidentical() b) remove() [1.5] d) getEJBMetData() 109 The _ method... directly invoked c) The EJB container delegates [1.5] the client request to the bean instance b) The EJB container intercepts d) The EJB container delegates the call by the client the client request to the bean instance 103 Which of the following is not a management function performed by an EJB container a) Container logic c) Bean instance logic b) Security logic [1.0] d) Transaction logic 104 Which of... _ package found in the [2.5] a) javax .ejb. DeploymentDescriptor c) javax .ejb. ControlDescriptor b) javax .ejb. deployment d) javax .ejb. descriptor 132 The _ is a gateway for the bean to interact [0.5] with the container a) setSetContext(Session Context ctx) c) ejbActivate() b) ejbCreate() d) ejbRemove() 133 The container may not call the ejbRemove() method Why? a) Because the life of... container and EJB server in EJB can be used [1.5] inter-changeably Do you agree with this statement? a) Agree 67 Adaptation of the access level of beans to fit into a particular system is [1.0] done by the system administrator a) True 68 b) Disagree b) False The management tools used by the EJB server and container are controlled by the _ a) EJB deployer 69 c) EJB container b) EJB server d) EJB administrator... valid: ……………… ……………… public void ejbActivate(){} public void ejbPassivate(){} public void ejbRemove(){} ……………………… a) Yes – they are valid [2.5] b) No – they will generate an error 142 Which of the following methods of stateless session beans never have [2.5] their callback methods invoked a) SetSetContext(Session Context ctx) d) ejbRemove() b) ejbCreate() e) ejbPassivate() c) ejbActivate() 143 The arguments... entity beans can be _ destroyed by a) EJBMetadata object the [1.0] c) Secondary key b) Primary key passing d) EJB handle 114 Which of the following is not the responsibility of the EJB home object [1.5] a) Make a copy of every c) Instantiate an EJB object method exposed by the bean class b) Remove the EJB objects d) Search for an existing EJB object 115 The deployment descriptor is essentially... a) setSetContext(Session Context ctx) c) ejbActivate() b) ejbCreate() d) ejbRemove() 127 The ejbpassivate() method is called before the bean is passivated a) True [0.5] b) False 128 Deployment descriptors are that describe the bean and some of its runtime behavior to the container [2.5] a) jar files c) serialized classes b) interfaces d) beans 129 The ejb- jar.xml file may or may not be present... Which of the following statements is not true regarding an EJB object a) The EJB container manifests itself as a single networkaware object [2.0] c) This is the original object aware of networking, transactions and security b) The network-aware object is d) This object performs the also called the EJB object intermediate logic necessary for the EJB container to service the method calls 105 The interface,... the code given below The method simpleint() given below is an example of _ [2.0] Import java .ejb. *; Public class sess implements SessionBean { public int simpelint(int pi,int rate,int tm ) { return (pi + (pi * rate * tm / 100); } } a) ejbCreate() method c) ejbPassivate() method b) business method d) ejbActivate method 135 Binding is an association of a _ with a/an [1.5] a) home interface/remote... the data in the database b) No – because they die along d) No – because they represent with the surrounding business logic environment 123 What are call back methods? [2.5] a) Container calling methods of c) Methods representing bean business logic b) Non-enduring methods d) Methods representing business data 124 _ session beans are more functional, [0.5] as they can retain their conversational . Programming Business Logic using EJB 1. WORA stands for _________________. [0.5] a) Write Once. used by the EJB server and container are controlled by the _________________. 1.0 a) EJB deployer c) EJB container b) EJB server d) EJB administrator

Ngày đăng: 09/04/2013, 09:10

Xem thêm: Programming Business Logic using EJB

TỪ KHÓA LIÊN QUAN

w