Spring MCQ Quiz Hub

Spring Mcq Set 19

Choose a topic to test your knowledge and improve your Spring skills

1. To create services and have those automatically installed in the registry.




2. Element to export the bean as an OSGi service, classified by the interface we specify.




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>




4. An anonymous bean specified inside of the osgi:service element allows you to avoid cluttering the namespace.




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:-




6. By default, beans created in a Spring application context are global to the entire OSGi runtime.




7. Sometimes, you may want to limit the visibility of a service so that multiple clients each get their own instance of the bean.




8. Spring Dynamic Modules also supports injection and manipulation of bundles themselves. An injected bundle is of type:-




9. Once acquired, the Bundle can be interrogated to introspect information about the bundle itself, including any entries, its current state.




10. OSGi will let you maintain multiple versions of a service in your registry at the same time.




11. Multiple services of the same interface may be registered inside of an OSGi environment, which necessitates a conflict-resolution process.




12. When specified on a service element, allows the ascription of a rank relative to other beans with the same interface.




13. A more robust solution to service discrimination is service attributes.




14. There are frequently situations where OSGi will return more than one instance of a service that satisfies the interface.




15. Attribute, which, is the symbolic name of another bundle.




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.




17. OSGi doesn’t solve framework concerns, instead focusing on infrastructure requirements for Java applications.




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.




19. SpringSource dm Server many advances focus on delivering a solution, and not just a framework, for delivering:-




20. SpringSource dm Server provides value above and beyond a regular OSGi solution.




21. OSGi–enabling all of these interwoven dependencies via the granular use of the Import-Package header would be tedious.




22. SpringSource dm Server also allows you to bend the rules where necessary.




23. SpringSource dm Server works with several types of deployment formats:-




24. Application isolation is critical because it allows you to solve the issue of reconciliation of two services whose interfaces collide. You can use:-




25. SpringSource dm Server provides the robustness needed to commoditize enterprise application development in an OSGi environment.




26. To begin with SpringSource dm Server but need a way to rapidly turnaround development.




27. SpringSource has provided solid tooling for Eclipse, called :-




28. These tools—part of the broader SpringSource Tool Suite—are available as :-




29. Java provides a mechanism, where an object can be represented as a sequence of bytes:-




30. After a serialized object has been written into a file, it can be read from the file and deserialized.




31. Serialization is JVM independent.




32. The ObjectOutputStream class contains methods for writing various data types.




33. The ObjectInputStream class contains methods for writing various data types.




34. For a class to be serialized successfully:




35. When serializing an object to a file, the standard convention in Java is to give the file a:




36. What will be the value of transient field after deserialization:-




37. If the class implements java.io.Serializable, then it is serializable; otherwise, it’s not.




38. To send an email using your Java Application:-




39. If you want to send an email to multiple recipients:-




40. void addRecipients(Message.RecipientType type, Address[] addresses) Parameter:- type: This would be set to:-




41. void addRecipients(Message.RecipientType type, Address[] addresses) Parameter:- addresses: This is the array of email ID, the method used while specifying email IDs




42. To set content whose second argument is “text/html” to specify that the HTML content is included in the message.




43. If it is required to provide user ID and Password to the email server for authentication purpose then you can set properties:




44. It is assumed that your localhost is connected to the internet and capable enough to send an email.