aInfoEra
Home
MCQs
Spring — Quiz
Spring Mcq Set 19
44 questions · Test your knowledge
Home
/
MCQs
/
Spring Mcq Set 19
1
To create services and have those automatically installed in the registry.
A
Spring Dynamic Modules
B
Spring DM Server
C
Spring Tooling
D
None of the mentioned
2
Element to export the bean as an OSGi service, classified by the interface we specify.
A
osgix
B
osgi:service
C
all of the mentioned
D
None of the mentioned
3
These beans are proxies, some may load asynchronously or take a longer time to register. <osgi:service interface="com.apress.springrecipes. osgi.helloworld.service.GreeterService"> <bean class="com.apress.springrecipes.osgi.helloworld. service.GreeterServiceImpl"/> </osgi:service>
A
True
B
False
C
none
D
all the mentoined
4
An anonymous bean specified inside of the osgi:service element allows you to avoid cluttering the namespace.
A
True
B
False
C
none
D
all the mentoined
5
The first, most direct connection to OSGi is the bean that’s created on your behalf when you export a service. This bean, an instance of:-
A
org.osgi.framework.ServiceRegistration
B
org.osgi.framework.Service
C
org.osgi.framework.ServiceRegister
D
None of the mentioned
6
By default, beans created in a Spring application context are global to the entire OSGi runtime.
A
True
B
False
C
none
D
all the mentoined
7
Sometimes, you may want to limit the visibility of a service so that multiple clients each get their own instance of the bean.
A
time
B
scope
C
attr
D
None of the mentioned
8
Spring Dynamic Modules also supports injection and manipulation of bundles themselves. An injected bundle is of type:-
A
org.osgi.framework.savedBundle
B
org.osgi.framework.Bundle
C
org.osgi.framework.BundleInstance
D
None of the mentioned
9
Once acquired, the Bundle can be interrogated to introspect information about the bundle itself, including any entries, its current state.
A
True
B
False
C
none
D
all the mentoined
10
OSGi will let you maintain multiple versions of a service in your registry at the same time.
A
True
B
False
C
none
D
all the mentoined
11
Multiple services of the same interface may be registered inside of an OSGi environment, which necessitates a conflict-resolution process.
A
True
B
False
C
none
D
all the mentoined
12
When specified on a service element, allows the ascription of a rank relative to other beans with the same interface.
A
Ranking
B
Service
C
All of the mentioned
D
None of the mentioned
13
A more robust solution to service discrimination is service attributes.
A
True
B
False
C
all of the mentioned
D
None of the mentioned
14
There are frequently situations where OSGi will return more than one instance of a service that satisfies the interface.
A
True
B
False
C
none
D
all the mentoined
15
Attribute, which, is the symbolic name of another bundle.
A
Fragment
B
Fragment-Host
C
All of the mentioned
D
none of the mentioned
16
Support for deployment of traditional .war artifacts, enable use of some of the standard Java EE libraries, provide useful defaults for many de facto standard libraries, and provide fully integrated support for Spring Dynamic Modules.
A
Spring Dynamic Modules
B
Spring dm Server
C
Spring Tooling
D
all of the mentioned
17
OSGi doesn’t solve framework concerns, instead focusing on infrastructure requirements for Java applications.
A
True
B
False
C
all of the mentioned
D
None of the mentioned
18
Spring Dynamic Modules was, while powerful for those already invested in an OSGi platform, not the most natural accommodations for those trying to migrate large code into the OSGi environment, SpringSource created.
A
Spring Dynamic Modules
B
Spring dm Server
C
Spring Tooling
D
all of the mentioned
19
SpringSource dm Server many advances focus on delivering a solution, and not just a framework, for delivering:-
A
Spring Tooling
B
Spring dm
C
OSGi
D
None of the mentioned
20
SpringSource dm Server provides value above and beyond a regular OSGi solution.
A
True
B
False
C
none
D
None of the mentioned
21
OSGi–enabling all of these interwoven dependencies via the granular use of the Import-Package header would be tedious.
A
True
B
False
C
none
D
all the mentoined
22
SpringSource dm Server also allows you to bend the rules where necessary.
A
True
B
False
C
none of the mentioned
D
all the mentoined
23
SpringSource dm Server works with several types of deployment formats:-
A
bundle
B
Java EE .war
C
platform archive
D
all of the mentioned
24
Application isolation is critical because it allows you to solve the issue of reconciliation of two services whose interfaces collide. You can use:-
A
.WAR
B
.XML
C
.PAR
D
all of the mentioned
25
SpringSource dm Server provides the robustness needed to commoditize enterprise application development in an OSGi environment.
A
True
B
False
C
all of the mentioned
D
None of the mentioned
26
To begin with SpringSource dm Server but need a way to rapidly turnaround development.
A
Spring Dynamic Module
B
Spring Dynamic Server
C
SpringSource dm Server
D
none of the mentioned
27
SpringSource has provided solid tooling for Eclipse, called :-
A
Spring Dynamic Module
B
dm Server Tools
C
SpringSource dm Server
D
None of the mentioned
28
These tools—part of the broader SpringSource Tool Suite—are available as :-
A
plug-in
B
stand-alone environment
C
all of the mentioned
D
None of the mentioned
29
Java provides a mechanism, where an object can be represented as a sequence of bytes:-
A
Serialization
B
Compilation
C
All of the mentioned
D
None of the mentioned
30
After a serialized object has been written into a file, it can be read from the file and deserialized.
A
True
B
False
C
none
D
all the mentoined
31
Serialization is JVM independent.
A
True
B
False
C
none
D
all the mentoined
32
The ObjectOutputStream class contains methods for writing various data types.
A
public final void writeObject(Object x)
B
public final void write(Object x)
C
public final void writeToObject(Object x)
D
all of the mentioned
33
The ObjectInputStream class contains methods for writing various data types.
A
public final Object readObject()
B
public final Object read(Object x)
C
public final Object readFromObject(Object x)
D
all of the mentioned
34
For a class to be serialized successfully:
A
The class must implement the java.io.Serializable interface.
B
Every field in the class must be volatile.
C
All of the mentioned
D
None of the mentioned
35
When serializing an object to a file, the standard convention in Java is to give the file a:
A
.war
B
.java
C
.ser
D
None of the mentioned
36
What will be the value of transient field after deserialization:-
A
0
B
NULL
C
All of the mentioned
D
None of the mentioned
37
If the class implements java.io.Serializable, then it is serializable; otherwise, it’s not.
A
True
B
False
C
none
D
all the mentoined
38
To send an email using your Java Application:-
A
JavaMail API
B
Java Activation Framework (JAF)
C
All of the mentioned
D
none of the mentioned
39
If you want to send an email to multiple recipients:-
A
void addRecipients(Message.RecipientType type, Address[] addresses)
B
void addRecipients(Message.RecipientType type)
C
all of the mentioned
D
None of the mentioned
40
void addRecipients(Message.RecipientType type, Address[] addresses) Parameter:- type: This would be set to:-
A
TO
B
CC
C
BCC
D
All of the mentioned
41
void addRecipients(Message.RecipientType type, Address[] addresses) Parameter:- addresses: This is the array of email ID, the method used while specifying email IDs
A
Internet
B
InternetAddress
C
BCC
D
All of the mentioned
42
To set content whose second argument is “text/html†to specify that the HTML content is included in the message.
A
setContent
B
content
C
setMail
D
none of the mentioned
43
If it is required to provide user ID and Password to the email server for authentication purpose then you can set properties:
A
props.setProperty(“mail.userâ€, “myuserâ€)
B
props.setProperty(“mail.passwordâ€, “mypwdâ€)
C
all of the mentioned
D
None of the mentioned
44
It is assumed that your localhost is connected to the internet and capable enough to send an email.
A
True
B
False
C
none
D
all the mentoined
Submit Quiz
Back to All Quizzes