Cracking the Java Coding Interview pdfdrive com


Question How do the six transaction attributes map to isolation levels like


Download 1.48 Mb.
Pdf ko'rish
bet87/182
Sana02.05.2023
Hajmi1.48 Mb.
#1423275
1   ...   83   84   85   86   87   88   89   90   ...   182
Bog'liq
Cracking the Java Coding Interview ( PDFDrive )

Question How do the six transaction attributes map to isolation levels like
"dirty read"? Will an attribute like "Required" lock out other readers until
I'm finished updating? (EJB)
Answer The Transaction Attributes in EJB do not map to the Transaction
Isolation levels used in JDBC. This is a common misconception. Transaction
Attributes specify to the container when a Transaction should be started,
suspended(paused) and committed between method invocations on Enterprise
JavaBeans. For more details and a summary of Transaction Attributes refer to
section 11.6 of the EJB 1.1 specification.
Question I have created a remote reference to an EJB in FirstServlet. Can I
put the reference in a servlet session and use that in SecondServlet? (EJB)
Answer Yes. The EJB client (in this case your servlet) acquires a remote
reference to an EJB from the Home Interface; that reference is serializable and
can be passed from servlet to servlet. If it is a session bean, then the EJB server
will consider your web client's servlet session to correspond to a single EJB
session, which is usually (but not always) what you want.
Question Can the primary key in the entity bean be a Java primitive type
such as int? (EJB)
Answer The primary key can't be a primitive type--use the primitive wrapper
classes, instead. For example, you can use java.lang.Integer as the primary key
class, but not int (it has to be a class, not a primitive)


Question What's new in the EJB 2.0 specification? (EJB)
Answer Following are the main features supported in EJB 2.0 * Integration of
EJB with JMS Message Driven Beans Implement additional Business methods
in Home interface which are not specific for bean instance. * EJB QL.
Question How many types of protocol implementations does RMI have?
(RMI)
Answer RMI has at least three protocol implementations: Java Remote Method
Protocol(JRMP), Internet Inter ORB Protocol(IIOP), and Jini Extensible Remote
Invocation(JERI). These are alternatives, not part of the same thing, All three are
indeed layer 6 protocols for those who are still speaking OSI reference model.

Download 1.48 Mb.

Do'stlaringiz bilan baham:
1   ...   83   84   85   86   87   88   89   90   ...   182




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling