Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

56 J2EE FAQS

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Part 1:
1)A developer successfully creating and tests a stateful bean following deployment, intermittent "NullpointerException" begin to occur, particularly when the server is hardly loaded. What most likely torelated problem.
a) setSessionContext
b) ejbCreate
c) ejbPassivate
d) beforeCompletion
e) ejbLoad
2)2 example implementations os Proxy are RMI & EJb
3)If an RMI parameter implements java.rmi.Remote, how is it passed "on-the-wire?"
Choice 1 It can never be passed.
Choice 2 It is passed by value.
Choice 3 It cannot be passed because it implements java.rmi.Remote.
Choice 4 It cannot be passed unless it ALSO implements java.io.Serializable.
Choice 5 It is passed by reference.
ans)2
4)public synchronized void txTest(int i) {
System.out.println("Integer is: " + i);
}
What is the outcome of attempting to compile and execute the method above, assuming it is implemented in a stateful session bean?
Choice 1 Run-time error when bean is created
Choice 2 The method will run, violating the EJB specification.
Choice 3 Compile-time error for bean implementation class
Choice 4 Compile-time error for remote interface
Choice 5 Run-time error when the method is executed
ans)2
5)What is the CORBA naming service equivalent of JNDI?
Choice 1 Interface Definition Language
Choice 2 COS Naming
Choice 3 Lightweight Directory Access Protocol
Choice 4 Interoperable Inter-Orb Protocol
Choice 5 Computer Naming Service
ans)2

6)InitialContext ic = new InitialContext();
TestHome th = (TestHome)
ic.lookup("testBean/TestBean");
TestRemote beanA = th.create();
TestRemote beanB = th.create();
TestRemote beanC = th.create();
beanC.remove();
TestRemote beanD = th.create();
TestRemote beanE = th.create();
beanC = th.create();
Given the above code, container passivates which bean instance first if the container limited the bean pool size to four beans and used a "least-recently-used" algorithm to passivate?
Choice 1 Bean A
Choice 2 Bean B
Choice 3 Bean C
Choice 4 Bean D
Choice 5 Bean E
7)Which one of the following phenomena is NOT addressed
by read-consistency?
a Phantom read
b Cached read
c Dirty read
d Non-repeatable read
e Fuzzy read
ans)b,e
8)Which one of the following methods is generally called in both ejbLoad() and ejbStore()?
a getEJBObject()
b getHandle()
c remove()
d getEJBHome()
e getPrimaryKey()
ans)e
9)public void ejbCreate(int i) {
System.out.println("ejbCreate(i)");
}
Given a currently working stateless session bean, what will be the outcome upon deploying and executing the bean if you added the above unique method to the implementation class of a stateless session bean (and made no other changes)?
a Compile time error during stub/skeleton generation
b Compile time error for home interface
c Code will compile without errors.
d Compile time error for remote interface
e Compile time error for bean implementation
ans)a
10)Given the above code in your stateless session bean business method implementation, and the transaction is container-managed with a Transaction Attribute of TX_SUPPORTS, which one of the following is the first error generated?
a Error when compiling home interface
b Error while generating stubs and skeletons
c NullPointerException during deployment
d Runtime error
e Compile-time error for the bean implementation
ans)b
11)Which one of the following is the result of attempting to deploy a stateless session bean and execute one of the method M when the bean implementation contains the method M NOT defined in the remote interface?
a Compile time error for remote interface
b Compile time error for bean implementation
c Compile time error during stub/skeleton generation
d Code will compile without errors.
e Compile time error for home interface
ans)d
12)Which one of the following characteristics is NOT true of RMI and Enterprise Java Beans?
a They must execute within the confines of a Java virtual machine (JVM).
b They serialize objects for distribution.
c They require .class files to generate stubs and skeletons.
d They do not require IDL.
e They specify the use of the IIOP wire protocol for
distribution.
ans)a
13. Which one of the following is the result of attempting to deploy a stateless session bean and execute one of the method M when the bean implementation contains the method M NOT defined in the remote interface?
a Compile time error for remote interface
b Compile time error for bean implementation
c Compile time error during stub/skeleton generation
d Code will compile without errors.
e Compile time error for home interface
14. If a unique constraint for primary keys is not enabled in a database, multiple rows of data with the same primary key could exist in a table. Entity beans that represent the data from the table described above are likely to throw which exception?
a NoSuchEntityException
b FinderException
c ObjectNotFoundException
d RemoveException
e NullPointerException
15. A developer needs to deploy an Enterprise Java Bean, specifically an entity bean, but is unsure if the bean container is able to create and provide a transaction context.Which attribute below will allow successful deployment of the bean?
a BeanManaged
b RequiresNew
c Mandatory
d Required
e Supports
16. What is the outcome of attempting to compile and execute the method above, assuming it is implemented in a stateful session bean?
a Compile-time error for remote interface
b Run-time error when bean is created
c Compile-time error for bean implementation class
d The method will run, violating the EJB specification.
e Run-time error when the method is executed
17. Which one of the following is the result of attempting to deploy a stateless session bean and execute one of the method M when the bean implementation contains the method M NOT defined in the remote interface?
a Compile time error for remote interface
b Compile time error for bean implementation
c Compile time error during stub/skeleton generation
d Code will compile without errors.
e Compile time error for home interface
18. If a unique constraint for primary keys is not enabled in a database, multiple rows of data with the same primary key could exist in a table. Entity beans that represent the data from the table described above are likely to throw which exception?
a NoSuchEntityException
b FinderException
c ObjectNotFoundException
d RemoveException
e NullPointerException
19. There are two Enterprise Java Beans, A and B. A method in "A" named "Am" begins execution, reads a value v from the database and sets a variable "X" to value v, which is one hundred. "Am" adds fifty to the variable X and updates the database with the new value of X. "Am" calls "Bm", which is a method in B. "Bm" begins executing. "Bm" reads an additional value from the database. Based on the value, "Bm" determines that a business rule has been
violated and aborts the transaction. Control is returned to "Am".Requirement:If "Bm" aborts the transaction, it is imperative that the original value be read from the database and stored in variable X.
Part 2:
1).Given the scenario above, which Transaction Attributes will most likely meet the requirements stated?
a A-RequiresNew, B-Mandatory
b A-Mandatory, B-RequiresNew
c A-RequiresNew, B-Supports
d A-NotSupported, B-RequiresNew
e A-RequiresNew, B-RequiresNew
2).If an RMI parameter implements java.rmi.Remote, how is it passed "on-the-wire?"
Choice 1 It can never be passed.
Choice 2 It is passed by value.
Choice 3 It cannot be passed because it implements java.rmi.Remote.
Choice 4 (Correct) It cannot be passed unless it ALSO implements
java.io.Serializable.
Choice 5 It is passed by reference.
3).public synchronized void txTest(int i) {
System.out.println("Integer is: " + i);
}
What is the outcome of attempting to compile and execute the method above, assuming it is implemented in a stateful session bean?
Choice 1 Run-time error when bean is created
Choice 2 The method will run, violating the EJB specification.
Choice 3 (Correct) Compile-time error for bean implementation class
Choice 4 Compile-time error for remote interface
Choice 5 Run-time error when the method is executed
4).What is the CORBA naming service equivalent of JNDI?
Choice 1 Interface Definition Language
Choice 2 (Correct)COS Naming
Choice 3 Lightweight Directory Access Protocol
Choice 4 Interoperable Inter-Orb Protocol
Choice 5 Computer Naming Service
5) InitialContext ic = new InitialContext();
TestHome th = (TestHome)
ic.lookup("testBean/TestBean");
TestRemote beanA = th.create();
TestRemote beanB = th.create();
TestRemote beanC = th.create();
beanC.remove();
TestRemote beanD = th.create();
TestRemote beanE = th.create();
beanC = th.create();
Given the above code, container passivates which bean instance first if the container limited the bean pool size to four beans and used a "least-recently-used" algorithm to passivate?
Choice 1 Bean A
Choice 2 Bean B
Choice 3 Bean C
Choice 4 (Correct, Since only Statefull session bean and Entity Bean can be passivated, and Entitybean can not call as th.create() normally, I take it as statefull session bean) Bean D
Choice 5 Bean E
6).Which one of the following phenomena is NOT addressed by read-consistency?a Phantom read (Correct)
b Cached read
c Dirty read
d Non-repeatable read
e Fuzzy read
7).Which one of the following methods is generally called in both ejbLoad() and ejbStore()?
a getEJBObject()
b getHandle()
c remove()
d getEJBHome()
e getPrimaryKey() (Correct)
8).public void ejbCreate(int i) {
System.out.println("ejbCreate(i)");
}
Given a currently working stateless session bean, what will be the outcome upon deploying and executing the bean if you added the above unique method to the implementation class of a stateless session bean (and made no other changes)?
a Compile time error during stub/skeleton generation (Correct)
b Compile time error for home interface
c Code will compile without errors.
d Compile time error for remote interface
e Compile time error for bean implementation
9).Given the above code in your stateless session bean business method implementation, and the transaction is container-managed with a Transaction Attribute of TX_SUPPORTS, which one of the following is the first error generated?
a Error when compiling home interface
b Error while generating stubs and skeletons (Correct)
c NullPointerException during deployment
d Runtime error
e Compile-time error for the bean implementation
10).Which one of the following is the result of attempting to deploy a stateless session bean and execute one of the method M when the bean implementation contains the method M NOT defined in the remote interface?
a Compile time error for remote interface
b Compile time error for bean implementation
c Compile time error during stub/skeleton generation
d Code will compile without errors. (Correct)
e Compile time error for home interface
11).Which one of the following characteristics is NOT true of RMI and Enterprise Java Beans?
a They must execute within the confines of a Java virtual machine (JVM).
b They serialize objects for distribution.
c They require .class files to generate stubs and skeletons.
d They do not require IDL.
e They specify the use of the IIOP wire protocol for distribution. (InCorrect)

12).Scheduling project activities such as functional increments and test case development, which one of the following OOAD artifacts is the MOST useful?
a) Use cases
b) Interaction diagrams
c) Activity diagrams
d) Package diagrams
e) Class Diagrams
13).Single Select - Please select the best answer (one and only one choice must be selected). 2)
When using OOAD artifacts to organize and assign team responsibilities on a project, it is BEST to:
a) evenly distribute use cases among team members and have them work as independently as possible in order to minimize code dependencies
b) designate one team for implementing interaction diagrams related to the "common code path" and another team for implementing interaction diagrams related to "code path variations" (for example ? conditional or error paths)
c) divide teams according to package diagram dependencies and utilize use cases to schedule the work for the individual team members
d) divide teams according to the layers in the software architecture and have them work as independently as possible in order to minimize dependencies between the layers}
Single Select - Please select the best answer (one and only one choice must be selected).
14) .To MOST effectively manage teams working on different packages within a large project, which one of the following should be true?
a) One technical lead should control the project details and communicate decisions to the different teams.
b) Type of database ( DB2 UDB, Oracle, Sybase, or InstantDB )
c) The team leads should focus on quality designs for the internals of their packages, mentoring their team members.
d) Communications between the teams should be minimized to reduce overhead burdens while they work on separate, independent use cases for their packages. Single Select - Please select the best answer (one and only one choice must be selected).
15) http://certify.torolab.ibm.com/figures/test486F3.gif What is wrong with the following analysis use case?
a) There are design details intermixed with the requirements.
b) The actor's actions and system responses are not separated.
c) "Sell goods" is too broad to be a use case.
d) There is nothing wrong with this use case.
Single Select - Please select the best answer (one and only one choice must be selected).
16) http://certify.torolab.ibm.com/figures/test486F5.gif When creating the use cases related to the "Prepare for an Event" scenario in the Figure ChefScenario, which one of the following BEST represents the type of terminology that the use cases should contain?
a) chef, menu, recipes, ingredients
b) end user, bill of fare, cooking specifications, food contents
c) chef object, menu object, recipe object, ingredient object
d) person record, menu print stream, recipe container, ingredient array
Single Select - Please select the best answer (one and only one choice must be selected).
17) http://certify.torolab.ibm.com/figures/test486F4.gif Which one of the following is the BEST set of potential use cases for the "Prepare for an Event" scenario in Figure ChefScenario?
a) Prepare for party, Display menu, Generate shopping list, Exclude ingredients on hand, Generate utensil list, Generate to do list
b) Prepare for party, Display menu, Generate shopping list, Generate utensil list, Pack utensils, Generate to do list
c) Display menu, Generate shopping list, Generate utensil list, Generate to do list
d) Display menu, Generate shopping list, Exclude ingredients on hand, Generate utensil list, Generate to do list
e) Generate shopping list, Exclude ingredients on hand, Generate utensil list, Generate to do list, Check utensil list
Single Select - Please select the best answer (one and only one choice must be selected).
18) Which of the following are recommended when developing an OO system?
a) Write a description of the concept that a class represents whenever a new class is declared.
b) Use interfaces for types or roles that objects may play, independent of their location in the class hierarchy.
c) Apply design patterns where applicable in the system.
d) Name classes based on their design specifics, such as "array" or "queue".
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
19) Which one of the following is a good strategy for resolving class name collisions that occur during OO analysis?
a) Allow each team member to choose a preferred name.
b) Create a class for each domain name, passing on requests to the one class that implements the behavior for all of them to share.
c) Discover better names for different concepts that are referred by the same term.
Single Select - Please select the best answer (one and only one choice must be selected).
20) http://certify.torolab.ibm.com/figures/test486F12.gif Referring to the partial class diagram in Figure Qualified Association, which of the following BEST describes the relationship?
a) Access to SalesLineItems is by Product. A SalesTransaction can have multiple SalesLineItems for one Product.
b) Access to Products is by SalesLineItem. A SalesTransaction has zero or more SalesLineItems for one Product.
c) SalesTransactions contain Products, which are listed by one or more SalesLineItems.
d) SalesLineItems are for a quantity of one or more Products for a particular SalesTransaction.
Single Select - Please select the best answer (one and only one choice must be selected).
21) http://certify.torolab.ibm.com/figures/test486F9.gif Refer to the Figure Sample 1. Consider the scenario that eStore.com sells small appliances over the Internet. Currently, the store's
catalog includes over 50 appliances from 10 different suppliers. A partial class diagram is shown in Figure Sample 1. If there is a new requirement to restock the warehouse automatically as products are sold, how is the new requirement BEST handled?
a) Add "reorderLevel" and "reorderQuantity" attributes used by a new deplete() method in the Inventory class. Use these to generate new orders as InventoryProducts are sold.
b) Add "reorderLevel" and "reorderQuantity" attributes used by a new deplete() method in the InventoryProduct class. Use these to generate new orders as InventoryProducts are sold.
c) Add a deliver() method to the Supplier class that uses the InventoryProduct's amountOnHand attribute to maintain the InventoryProducts in the warehouse.
d) Add "reorderLevel" and "reorderQuantity" to InventoryProduct. Create a Warehouse class that monitors the InventoryProducts' "amountOnHand", generating an order as levels drop below a "reorderQuantity".
Single Select - Please select the best answer (one and only one choice must be selected).
22) http://certify.torolab.ibm.com/figures/test486F18.gif What is the BEST model change for the following new requirements in the mortgage processing system?
a) Add an updateAssessedValue( newValue ) method to the Mortgage class, which uses newValue in collaboration with the Property's tax rates to provide tax amounts.
b) Add an updateAssessedValue( newValue ) method to the Property class, which uses newValue in collaboration with the TaxingAuthority's tax rates to provide tax amounts.
c) Add an updateAssessedValue( newValue ) method to the TaxingAuthority class, which uses its tax rates to provide tax amounts.
d) Add an updateAssessedValue( newValue ) method to the Property class, which uses its tax notes to provide tax amounts.
Single Select - Please select the best answer (one and only one choice must be selected).
23) Which of the following details are required in OO diagrams?
a) Show navigability of associations in conceptual class diagrams.
b) Show different scenario of a use case on the same interaction diagram for clear understanding.
c) Show message sequence numbers in collaboration diagrams.
d) If asynchronous messages exist in a scenario, show them in interaction diagrams.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

24) http://certify.torolab.ibm.com/figures/test486F16.gif Refer to the state diagram in Figure State for MortgageApplication. Suppose that there is a requirement to add state transitions to
a "Cancelled" state from any states except "Closed". Which of the following are valid ways to add the "Cancelled" state?
a) Funnel all cancellations from only one of the other states.
b) Add a "Cancelled" superstate to the diagram.
c) Add transitions from "Submitted" and "Qualified" to a new "Cancelled" state.
d) Add an "Active" superstate that handles the transition to "Cancelled".
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
25) http://certify.torolab.ibm.com/figures/test486F19.gif Which of the following is the BEST description of the sequence diagram in Figure Interaction? When an instance of a:
a) Person is asked for its assets, it sums the balances of each of its asset Accounts.
b) Customer is asked for its assets, it sums the balances of each of its asset Accounts.
c) Person is asked for its assets, it returns the balance of its asset Account.
d) Customer is asked for its assets, it returns the balance of its asset Account.
Single Select - Please select the best answer (one and only one choice must be selected).
26) Software entropy is a phenomenon wherein programs begin with well designed state, but as new functionalities are added, they lose their structure. Refactoring of classes is done to avoid software entropy. What are good practices to follow during refactoring?
a) Renaming a method and moving a field from one class to another should be done in small steps, testing changes as required.
b) Break down classes that are heavily loaded with responsibilities into smaller classes and distribute the responsibilities among them effectively.
c) Consolidate similar methods from different classes in the same type hierarchy into a common super class wherever possible.
d) Add functionality and refactor simultaneously in order to obtain an efficient and effective design.
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
27) Which of the following are good practices to use while designing for reuse?
a) Define a persistence framework that provides services for persisting objects.
b) Use design patterns, wherein complete solutions are already defined.
c) Use controller objects to control the flow of processes in the system.
d) Assign responsibilities to classes such that coupling between them remains low.
e) Design classes with low cohesion.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

28) http://certify.torolab.ibm.com/figures/test486F22.gif A partial class diagram of a college course management application is shown in Figure studentInstructor. A student knows all of the
instructors he is registered with. Similarly, an instructor also knows all the students who are registered with him. A new requirement is added which specifies that an instructor can also be a student for some courses. What is the BEST partial application redesign shown in the Figure?
a) Design 'A'
b) Design 'B'
c) Design 'C'
d) Design 'D'
e) Design 'E'
Single Select - Please select the best answer (one and only one choice must be selected).
29) When using OOAD artifacts to organize and assign team responsibilities on a project, it is BEST to:
a) evenly distribute use cases among team members and have them work as independently as possible in order to minimize code dependencies
b) designate one team for implementing interaction diagrams related to the "common code path" and another team for implementing interaction diagrams related to "code path variations" (for example ? conditional or error paths)
c) divide teams according to package diagram dependencies and utilize use cases to schedule the work for the individual team members
d) divide teams according to the layers in the software architecture and have them work as independently as possible in order to minimize dependencies between the layers}
Single Select - Please select the best answer (one and only one choice must be selected).
30) An iterative development process:
a) represents a structured methodology, which includes functional decomposition.
b) is a technique for managing complexity and plans for change during software development.
c) is a top-down approach without the dataflow diagrams.
d) is equivalent to an incremental development process.
Single Select - Please select the best answer (one and only one choice must be selected).
31) If a use case had a requirement "Calculate account balance," which OOAD artifact would be the BEST source for determining the name of the public method used to invoke the operation?
a) Use case
b) Interaction diagram
c) Class diagram
d) Activity diagram
Single Select - Please select the best answer (one and only one choice must be selected).
32) http://certify.torolab.ibm.com/figures/test486F4.gif When creating the use cases related to the "Prepare for an Event" scenario in the Figure ChefScenario, which one of the following BEST represents the type of terminology that the use cases should contain a) chef, menu, recipes, ingredients
b) end user, bill of fare, cooking specifications, food contents
c) chef object, menu object, recipe object, ingredient object
d) person record, menu print stream, recipe container, ingredient array
Single Select - Please select the best answer (one and only one choice must be selected).
33) http://certify.torolab.ibm.com/figures/test486F1.gif What are the system's actors in the diagram, Figure Use Case ?
a) Clerk, Manager
b) Clerk, Manager, Customer
c) Clerk, Manager, Bank network
d) Clerk, Manager, Bank network, Customer
Single Select - Please select the best answer (one and only one choice must be selected).
34) When designing the user interface for an application, if it is unclear what skill level the end user of an application will possess, which of the following is the BEST approach to take?
a) Define the level of skill that will be required by the end user and make the necessary arrangements for educating the users.
b) Define the level of skill that will be required by the end user and provide detailed on-line help that can be accessed by the users when needed.
c) Prototype portions of the user interface and perform some usability tests to identify any problem areas. Document any issues in the product readme and have the users read it before using the product.
d) Prototype portions of the user interface and perform some usability tests to determine the users level of satisfaction. Make any necessary changes and repeat the process.}
Single Select - Please select the best answer (one and only one choice must be selected).
35) Which of the following is true about a deployment diagram?
a) Since there is always some kind of response to a message, the dependencies are two-way between deployment components.
b) Dependencies between deployment components tend to be the same as the package dependencies.
c) Deployment diagrams are NOT to be used to show physical modules of code.
d) Deployment diagrams do NOT show physical distribution of a system across computers
Single Select - Please select the best answer (one and only one choice must be selected).
36) http://certify.torolab.ibm.com/figures/test486F13.gif Referring to the diagram in Figure Interface, which of the following are true?
a) Classes "X" and "Y" are subclasses of Mortgageable.
b) Instances of "X" and "Y" can be passed as parameters declared as type Mortgageable.
c) "X" and "Y" must implement a getAppraisedValue() method.
d) There are instances of Mortgageable in the production system.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
37) A resulting benefit of using polymorphism is reduction of:
a) methods in the associated classes
b) subclasses needed to accomplish the same functionality
c) case statements and conditionals
d) coupling between classes in the system
Single Select - Please select the best answer (one and only one choice must be selected).
38) http://certify.torolab.ibm.com/figures/test486F20.gif eStore.com sells small appliances over the Internet. Currently, the store's catalog includes over 50 appliances from 10 different
suppliers. A partial class diagram is shown in Figure Sample 1. There are two new requirements for eStore.com: discounts for damaged goods, and searches by size and color. Using Figure Sample 2, which of the following is the BEST way to extend the class diagram to handle these
requirements?
a) Extend the InventoryProduct class to handle the new requirements.
b) Create a new class "PhysicalProduct" that represents an actual product in the warehouse. Associate the PhysicalProduct with its related InventoryProduct.
c) Add new capabilities to the Inventory class for the management of its Products.
d) No changes are needed due to these requirements.
Single Select - Please select the best answer (one and only one choice must be selected).
39) When creating a subclass, the:
a) selected superclass should be chosen because it has some methods the subclass can reuse, even if others do not apply.
b) class name should normally be a qualification of its superclass' name
c) subclass should be of the same type as all of its superclasses
d) superclass should be marked as abstract
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
40) http://certify.torolab.ibm.com/figures/test486F14.gif Given the requirement statement, which of the following public methods would be used in a related sequence diagram?
a) aBalance.subtract( anAmount )
b) anAmortizationTable.calculateInterestUsing( aPayment )
c) anAmortizationTable.apply( aPayment )
d) aMortgage.apply( aPayment )
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
41) http://certify.torolab.ibm.com/figures/test486F18.gif What is the BEST model change for the following new requirements in the mortgage processing system?
a) Add an updateAssessedValue( newValue ) method to the Mortgage class, which uses newValue in collaboration with the Property's tax rates to provide tax amounts.
b) Add an updateAssessedValue( newValue ) method to the Property class, which uses newValue in collaboration with the TaxingAuthority's tax rates to provide tax amounts.
c) Add an updateAssessedValue( newValue ) method to the TaxingAuthority class, which uses its tax rates to provide tax amounts.
d) Add an updateAssessedValue( newValue ) method to the Property class, which uses its tax notes to provide tax amounts.
Single Select - Please select the best answer (one and only one choice must be selected).
42). Which two are the most interested for an Architect?
a. Scalability
b. Availability
c. Manageability
d. Reliability
e. Maintainability
f. Extensibility
43). Which can do more complicated mapping?CMP or BMP?
See ,there are the following rules for xml declaration:
1.The document type declaration must be placed between the XML declaration and the first element (root element) in the document.
2.The keyword DOCTYPE must be followed by the name of the root element in the XML document.
3. The keyword DOCTYPE must be in upper case.Note the following rules for mixed content
1.(#PCDATA) must come first in the mixed content declaration.
2.The operator (*) must follow the mixed content declaration if children elements are included.
As all these rules are fullfilled by conditions (a) and (c) so answer is......... a ,c.
44). Which of the following code is valid?
a)<!DOCTYPE test [ <!ELEMENT test (#PCDATA)]
b)<!DOCTYPE test [ <!ELEMENT test.dtd (elm1|elm2|#PCDATA) ]
c)<!DOCTYPE test [ <!ELEMENT test.dtd (#PCDATA|elm1|elm2)* ]
<!ELEMENT elm1 (#PCDATA)
<!ELEMENT elm2 (#PCDATA)
d)<!DOCTYPE test [ <!ELEMENT test test (#PCDATA)]
e)<!DOCTYPE test [ <!ELEMENT test "test" (#PCDATA)]
Answer is a) and c). But I think a) is the only correct choice, because the declaration should start from the root element test.
45) If an RMI parameter implements java.rmi.Remote, how is it passed "on-the-wire?"
Choice 1 It can never be passed.
Choice 2 It is passed by value.
Choice 3 It cannot be passed because it implements java.rmi.Remote.
Choice 4 (Correct) It cannot be passed unless it ALSO implements java.io.Serializable.
Choice 5 It is passed by reference.
46). public synchronized void txTest(int i) {
System.out.println("Integer is: " + i);
}
What is the outcome of attempting to compile and execute the method above, assuming it is implemented in a stateful session bean?
Choice 1 Run-time error when bean is created
Choice 2 The method will run, violating the EJB specification.
Choice 3 (Correct) Compile-time error for bean implementation class
Choice 4 Compile-time error for remote interface
Choice 5 Run-time error when the method is executed

47) What is the CORBA naming service equivalent of JNDI?
Choice 1 Interface Definition Language
Choice 2 (Correct) COS Naming
Choice 3 Lightweight Directory Access Protocol
Choice 4 Interoperable Inter-Orb Protocol
Choice 5 Computer Naming Service
48) InitialContext ic = new InitialContext();
TestHome th = (TestHome)
ic.lookup("testBean/TestBean");
TestRemote beanA = th.create();
TestRemote beanB = th.create();
TestRemote beanC = th.create();
beanC.remove();
TestRemote beanD = th.create();
TestRemote beanE = th.create();
beanC = th.create();
Given the above code, container passivates which bean instance first if the container limited the bean pool size to four beans and used a "least-recently-used" algorithm to passivate?
Choice 1 Bean A
Choice 2 Bean B
Choice 3 Bean C
Choice 4 (Correct, Since only Statefull session bean and Entity Bean can be passivated, and Entitybean can not call as th.create() normally, I take it as statefull session bean) Bean D
Choice 5 Bean E
49). Which one of the following phenomena is NOT addressed by read-consistency?
a Phantom read (Correct)
b Cached read
c Dirty read
d Non-repeatable read
e Fuzzy read
50) Which one of the following methods is generally called in both ejbLoad() and ejbStore()?
a getEJBObject()
b getHandle()
c remove()
d getEJBHome()
e getPrimaryKey() (Correct)
51) public void ejbCreate(int i) {
System.out.println("ejbCreate(i)");
}
Given a currently working stateless session bean, what will be the outcome
upon deploying and executing the bean if you added the above unique method
to the implementation class of a stateless session bean (and made no other changes)?
a Compile time error during stub/skeleton generation (Correct)
b Compile time error for home interface
c Code will compile without errors.
d Compile time error for remote interface
e Compile time error for bean implementation
52) Given the above code in your stateless session bean business method implementation, and the transaction is container-managed with a Transaction Attribute of TX_SUPPORTS, which one of the following is the first error generated?
a Error when compiling home interface
b Error while generating stubs and skeletons (Correct)
c NullPointerException during deployment
d Runtime error
e Compile-time error for the bean implementation
53). Which one of the following is the result of attempting to deploy a stateless session bean and execute one of the method M when the bean implementation contains the method M NOT defined in the remote interface?
a Compile time error for remote interface
b Compile time error for bean implementation
c Compile time error during stub/skeleton generation
d Code will compile without errors. (Correct)
e Compile time error for home interface
54). Which one of the following characteristics is NOT true
of RMI and Enterprise Java Beans?
a They must execute within the confines of a Java virtual machine (JVM).
b They serialize objects for distribution.
c They require .class files to generate stubs and skeletons.
d They do not require IDL.
e They specify the use of the IIOP wire protocol for
distribution. (InCorrect)
55).SSL is used to encrypt
a) All data
b) Data of IP layer, no header
c) Data of Physical layer, no header
d) Data TCP/IP physical Layer, no header
Which is correct?
56).what features of firewalls can interfere with IIOP.
1) Port filtering
2) Load balancing
3) Address filtering
4) Network Address Translation
[two rights in total].
1 and 3. Firewalls do not do Load balancing, nor dns functions.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Don't you think that you'd learn more if you did your own homework?
From Tom: If you have a particular question you would like discussed then please open that in a separate thread (sorry Bear. I closed the thread and this was easier than reopening it to add a comment).
[ February 14, 2004: Message edited by: Thomas Paul ]
 
Every snowflake is perfect and unique. And every snowflake contains a very tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    Bookmark Topic Watch Topic
  • New Topic