For a class to be serialized successfully:
1. The class must implement the java.io.Serializable interface.
2. Every field in the class must be volatile.
3.All of the mentioned
4.None of the mentioned
Java provides a mechanism, where an object can be represented as a sequence of bytes:-
1.Serialization
2.Compilation
3.All of the mentioned
4.None of the mentioned
There are frequently situations where OSGi will return more than one instance of a service that satisfies the interface.
1. True
2. False
3.none
4.all the mentoined
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>
1. True
2.False
3.none
4.all the mentoined
To send an email using your Java Application:-
1.JavaMail API
2.Java Activation Framework (JAF)
3.All of the mentioned
4.none of the mentioned
void addRecipients(Message.RecipientType type, Address[] addresses) Parameter:- addresses: This is the array of email ID, the method used while specifying email IDs
1.Internet
2. InternetAddress
3. BCC
4.All of the mentioned
What will be the value of transient field after deserialization:-
1.0
2.NULL
3. All of the mentioned
4.None of the mentioned
When serializing an object to a file, the standard convention in Java is to give the file a:
1..war
2..java
3..ser
4.None of the mentioned
A more robust solution to service discrimination is service attributes.
1.True
2.False
3.all of the mentioned
4.None of the mentioned
After a serialized object has been written into a file, it can be read from the file and deserialized.
1.True
2.False
3.none
4.all the mentoined
An anonymous bean specified inside of the osgi:service element allows you to avoid cluttering the namespace.
1.True
2.False
3.none
4.all the mentoined
Application isolation is critical because it allows you to solve the issue of reconciliation of two services whose interfaces collide. You can use:-
1. .WAR
2. .XML
3..PAR
4. all of the mentioned
Attribute, which, is the symbolic name of another bundle.
1.Fragment
2.Fragment-Host
3.All of the mentioned
4. none of the mentioned
By default, beans created in a Spring application context are global to the entire OSGi runtime.
1.True
2. False
3.none
4.all the mentoined
Element to export the bean as an OSGi service, classified by the interface we specify.
1.osgix
2. osgi:service
3.all of the mentioned
4.None of the mentioned
If it is required to provide user ID and Password to the email server for authentication purpose then you can set properties:
1. props.setProperty(“mail.user”, “myuser”)
2.props.setProperty(“mail.password”, “mypwd”)
3.all of the mentioned
4.None of the mentioned
If the class implements java.io.Serializable, then it is serializable; otherwise, it’s not.
1.True
2.False
3.none
4.all the mentoined
If you want to send an email to multiple recipients:-
1.void addRecipients(Message.RecipientType type, Address[] addresses)
2.void addRecipients(Message.RecipientType type)
3. all of the mentioned
4.None of the mentioned
It is assumed that your localhost is connected to the internet and capable enough to send an email.
1.True
2.False
3.none
4.all the mentoined
Multiple services of the same interface may be registered inside of an OSGi environment, which necessitates a conflict-resolution process.
1.True
2.False
3.none
4.all the mentoined
Once acquired, the Bundle can be interrogated to introspect information about the bundle itself, including any entries, its current state.
1.True
2. False
3.none
4.all the mentoined
OSGi doesn’t solve framework concerns, instead focusing on infrastructure requirements for Java applications.
1.True
2. False
3.all of the mentioned
4.None of the mentioned
OSGi will let you maintain multiple versions of a service in your registry at the same time.
1. True
2.False
3.none
4.all the mentoined
OSGi–enabling all of these interwoven dependencies via the granular use of the Import-Package header would be tedious.
1.True
2.False
3.none
4.all the mentoined
Serialization is JVM independent.
1.True
2.False
3.none
4.all the mentoined
Sometimes, you may want to limit the visibility of a service so that multiple clients each get their own instance of the bean.
1.time
2.scope
3.attr
4.None of the mentioned
Spring Dynamic Modules also supports injection and manipulation of bundles themselves. An injected bundle is of type:-
1.org.osgi.framework.savedBundle
2.org.osgi.framework.Bundle
3. org.osgi.framework.BundleInstance
4.None of the mentioned
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.
1.Spring Dynamic Modules
2. Spring dm Server
3. Spring Tooling
4. all of the mentioned
SpringSource dm Server also allows you to bend the rules where necessary.
1.True
2.False
3.none of the mentioned
4.all the mentoined
SpringSource dm Server many advances focus on delivering a solution, and not just a framework, for delivering:-
1.Spring Tooling
2. Spring dm
3.OSGi
4.None of the mentioned
SpringSource dm Server provides the robustness needed to commoditize enterprise application development in an OSGi environment.
1.True
2.False
3.all of the mentioned
4.None of the mentioned
SpringSource dm Server provides value above and beyond a regular OSGi solution.
1.True
2.False
3.none
4.None of the mentioned
SpringSource dm Server works with several types of deployment formats:-
1. bundle
2.Java EE .war
3. platform archive
4. all of the mentioned
SpringSource has provided solid tooling for Eclipse, called :-
1. Spring Dynamic Module
2.dm Server Tools
3.SpringSource dm Server
4.None of the mentioned
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.
1.Spring Dynamic Modules
2.Spring dm Server
3.Spring Tooling
4. all of the mentioned
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:-
1. org.osgi.framework.ServiceRegistration
2. org.osgi.framework.Service
3.org.osgi.framework.ServiceRegister
4.None of the mentioned
The ObjectInputStream class contains methods for writing various data types.
1. public final Object readObject()
2. public final Object read(Object x)
3.public final Object readFromObject(Object x)
4. all of the mentioned
The ObjectOutputStream class contains methods for writing various data types.
1. public final void writeObject(Object x)
2. public final void write(Object x)
3. public final void writeToObject(Object x)
4. all of the mentioned
These tools—part of the broader SpringSource Tool Suite—are available as :-
1.plug-in
2.stand-alone environment
3.all of the mentioned
4.None of the mentioned
To begin with SpringSource dm Server but need a way to rapidly turnaround development.
1.Spring Dynamic Module
2.Spring Dynamic Server
3. SpringSource dm Server
4. none of the mentioned
To create services and have those automatically installed in the registry.
1.Spring Dynamic Modules
2.Spring DM Server
3. Spring Tooling
4.None of the mentioned
To set content whose second argument is “text/html” to specify that the HTML content is included in the message.
1.setContent
2.content
3.setMail
4. none of the mentioned
void addRecipients(Message.RecipientType type, Address[] addresses) Parameter:- type: This would be set to:-
1.TO
2.CC
3.BCC
4.All of the mentioned
When specified on a service element, allows the ascription of a rank relative to other beans with the same interface.
1.Ranking
2.Service
3. All of the mentioned
4.None of the mentioned