Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
5Activity
×
0 of .
Results for:
No results containing your search query
P. 1
!J2EE Questions

!J2EE Questions

Ratings: (0)|Views: 646|Likes:
Published by api-3694132

More info:

Published by: api-3694132 on Oct 14, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, DOC, TXT or read online from Scribd
See More
See less

03/18/2014

pdf

text

original

http://groups.yahoo.com/group/jiny
JINY
1. What is JNDI?

The Java Naming and Directory Interface (JNDI) is an application programming interface (API) for accessing
different kinds of naming and directory services. JNDI is not specific to a particular naming or directory service, it
can be used to access many different kinds of systems including file systems; distributed objects systems like
CORBA, Java RMI, and EJB; and directory services like LDAP, Novell
NetWare, and NIS+.
JNDI provides two APIs and one SPI. JNDI has a naming API that allows Java applications to access naming
systems like CORBA's Naming services and a directory API that extends the naming service to provide access to
directory services like LDAP. JNDI also has a SPI (Service-Provider Interface) which is a programming model that
vendors use to write JNDI plug-ins or implementations for their specific product.

2. What's a Naming System or Service?

A naming system associates names with addresses. A phone book is a perfect example of a naming system that associate people's names with phone numbers and addresses. Naming systems are used in computing to make it easier for user to locate and utilize software that is addressable. A software system that exposes a naming system to other software is called a naming service.

3. What are the principal technologies of the J2EE platform?
The principal technologies which constiture the J2EE platfom are:

Enterprise JavaBeans
JavaServer Pages
Servlets
Java Naming and Directory Interface (JNDI)
Java Interface Definition Language (IDL)
JDBC
Java Message Service (JMS)

Java Transaction API (JTA)
Java Transaction Service (JTS)
JavaMail
RMI-IIOP

4. What is a CMP bean?

A CMP bean is an entity bean whose state is synchronized with the database automatically. In other words, the
bean developer doesn't need to write any explicit database calls into the bean code; the container will
automatically synchronize the persistent fields with the database as dictated by the deployer at deployment time.

5. What is a BMP bean?

A BMP bean is an entity bean that synchronizes its state with the database manually. In other words, the bean
developer must code explicit database calls into the bean itself. BMP provides the bean developer with more
flexibility in the how the bean reads and writes its data than a container-managed persistence (CMP) bean. CMP
bean is limited to the mapping facilities provided by the EJB vendor, BMP beans are only limited by skill of the
bean developer.

6. A local home or component interface for an EJB can only be used by:

A. Another EJB
B. A web-tier client
C. A business logic-tier client
D. A client located in the same JavaTM Virtual Machine (JVM)1

answer D
http://groups.yahoo.com/group/jiny
JINY
http://groups.yahoo.com/group/jiny
JINY

7. Local interfaces have declarative:
A. Transactions and security
B. Transactions only
C. Security only
D. Neither, for performance reasons

Answer A

8. An entity in a unidirectional relationship that is the target of a role with a cmr field:
A. Must have local home and component interfaces
B. Must have remote home and compnent interfaces
C. May have either local or remote interfaces, but not both
D. May have any combination of local or remote interfaces

Answer A

9. An entity in a unidirectional relationship that is the source of a role with a cmr field:
A. Must have local home and component interfaces
B. Must have remote home and compnent interfaces
C. May have either local or remote interfaces, but not both
D. May have any combination of local or remote interfaces

Answer D

10. The bean class for an entity that uses the EJB 2.0 model of container-managed persistence:
A. Must implement java.io.Serializable
B. Is only used for better integration with popular IDEs
C. Must be abstract
D. Must not be abstract

Answer c

11. The legal collection class type(s) to represent a many-valued relationship are:
A. java.util.Collection only
B. java.util.Collection and java.util.Set
C. java.util.List, java.util.Set, and java.util.Map
D. java.util.Map only

Answer b

12. If you call a "set" abstract accessor for a cmr field, it can:
A. Throw a java.sql.SQLException
B. Automatically cascade delete an entity
C. Automatically change the value of cmr fields in up to three additional beans
D. You can never call an abstract accessor

answer c

13. You can only specify cascade-delete on a relationship role if:
A. The role has a multiplicity of 'One'
B. The other role in the relationship has a multiplicity of 'One'
C. The role has a multiplicity of 'Many'
D. The other role in the relationship does not already use cascade-delete

http://groups.yahoo.com/group/jiny
JINY
http://groups.yahoo.com/group/jiny
JINY
answer B

14. If an entity has a relationship to another entity, it must:
A. Declare that entity reference in the deployment descriptor using the <ejb-ref> element
B. Declare that entity reference in the deployment descriptor using the <ejb-local-ref> element
C. Declare that entity reference in the deployment descriptor using the <ejb-link> element
D. No entity reference declaration is required

answer D

15. The bean developer must be cautious when iterating over a relationship collection class, because:
A. Concurrent transactions can modify the values
B. Changes to its contents can violate foreign key constraints in the database
C. Changes to its contents can trigger a referential integrity change to the collection class itself
D. The container developer is not required to support the Iterator class's next method

answer C

16. The EJB 2.0 specification introduces ejbSelect methods. These are:
A. Abstract methods in the bean class that call a query
B. The local home interface equivalent of a finder method
C. Methods in the component interface that call a query
D. A method that allows the bean developer to choose between a local and remote interface

answer A

17. The new EJB Query Language (EJB-QL) has three clauses: select, from, and where. Of these:
A. Only the from clause is mandatory
B. Only the select and from clauses are mandatory
C. Only the where clause is mandatory.
D. All clauses are mandatory.

answer B

18. In EJB-QL, date and time literals are represented by:
A. A string in the format MM-DD-YYYY HH:MM:SS +MILLISECONDS
B. A string in a locale-determined format
C. A string in a vendor specific format
D. A long value that represents a millisecond count, such as 979837813000

answer D

19. The type of interface (local or remote) returned from an ejbSelect statement can be:
A. Specified in the query
B. Specified in the deployment descriptor
C. Specified by the client
D. Is always a local interface

answer B

20. The functions available for use in the where clause of an EJB-QL query are:
A. All functions defined in standard SQL
B. All functions defined by the target database
C. All functions with defined escapes in JDBCTM 2.0
D. A limited subset of the functions defined for JDBC 2.0

http://groups.yahoo.com/group/jiny
JINY

Activity (5)

You've already reviewed this. Edit your review.
1 hundred reads
moon12 liked this
vigya2 liked this
manj_rash liked this
satheyaraaj liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->