Explore topic-wise MCQs in Spring.

This section includes 16 Mcqs, each offering curated multiple-choice questions to sharpen your Spring knowledge and support exam preparation. Choose a topic below to get started.

1.

Spring allows your beans to publish JMX notifications through:-

A. NotificationPublisher
B. Notification
C. Notify
D. All of the mentioned
Answer» B. Notification
2.

The simplest MBean assembler in Spring is, which allows you to specify the names of the methods to export.

A. MethodNameBasedMBeanInfoAssembler
B. MethodNameBasedMBeanInfo
C. MethodNameBasedMBean
D. MethodNameBasedInfoAssembler
Answer» B. MethodNameBasedMBeanInfo
3.

If no RMI registry has been created externally, you should create one by using:-

A. RmiRegistryFactory
B. RmiRegistryFactoryBean
C. RmiRegistry
D. RmiRegister
Answer» C. RmiRegistry
4.

? should be replaced by:-

A. service:jmx:rmi://localhost/jndi/rmi://localhost:1099/replicator
B. service:jmx:rmi://localhost/jndi/rmi://localhost:1099/
C. service:jmx:rmi://localhost/jndi//localhost:1099/replicator
D. none of the mentionedView Answer
Answer» B. service:jmx:rmi://localhost/jndi/rmi://localhost:1099/
5.

To register an MBean, you need an instance of the interface :- a) javax.management.MBeanServerb) javax.managementc) javax.management.MBeand) none of the mentionedView Answer a) ManagementFactory.getPlatform()b) ManagementFactory.getPlatformMBeanServer()c) ManagementFactory.getPlatformMBean()d) All of the mentionedView Answer

A. javax.management.MBeanServerb) javax.managementc) javax.management.MBeand) none of the mentionedView Answer a) ManagementFactory.getPlatform()b) ManagementFactory.getPlatformMBeanServer()c) ManagementFactory.getPlatformMBean()d) All of the mentionedView Answer a) ModelMBeanAttributeInfo
B. javax.managementc) javax.management.MBeand) none of the mentionedView Answer a) ManagementFactory.getPlatform()b) ManagementFactory.getPlatformMBeanServer()c) ManagementFactory.getPlatformMBean()d) All of the mentionedView Answer a) ModelMBeanAttributeInfob) ModelMBeanOperationInfo
C. javax.management.MBeand) none of the mentionedView Answer a) ManagementFactory.getPlatform()b) ManagementFactory.getPlatformMBeanServer()c) ManagementFactory.getPlatformMBean()d) All of the mentionedView Answer a) ModelMBeanAttributeInfob) ModelMBeanOperationInfoc) None of the mentioned
D. none of the mentionedView Answer a) ManagementFactory.getPlatform()b) ManagementFactory.getPlatformMBeanServer()c) ManagementFactory.getPlatformMBean()d) All of the mentionedView Answer a) ModelMBeanAttributeInfob) ModelMBeanOperationInfoc) None of the mentionedd) All of the mentionedView Answer
Answer» B. javax.managementc) javax.management.MBeand) none of the mentionedView Answer a) ManagementFactory.getPlatform()b) ManagementFactory.getPlatformMBeanServer()c) ManagementFactory.getPlatformMBean()d) All of the mentionedView Answer a) ModelMBeanAttributeInfob) ModelMBeanOperationInfo
6.

GETPLATFORM()?$

A. ManagementFactory.getPlatformMBeanServer()
B. ManagementFactory.getPlatformMBean()
C. All of the mentioned
Answer» B. ManagementFactory.getPlatformMBean()
7.

ModelMBeanAttributeInfo$

A. ModelMBeanOperationInfo
B. None of the mentioned
C. All of the mentioned
Answer» B. None of the mentioned
8.

Spring allows you to create a JMX connector server through:-

A. ConnectorServerFactoryBean
B. ConnectorServer
C. ConnectorServerFactory
D. All of the mentioned
Answer» B. ConnectorServer
9.

However, in an environment with no MBean server available, you have to create one explicitly using:-

A. MBeanServerFactoryBean
B. MBeanServerFactory
C. All of the mentioned
D. None of the mentioned
Answer» C. All of the mentioned
10.

VM argument to enable local monitoring of this application.

A. -Dcom.sun.management.jmxremote
B. -Dcom.sun.management
C. -Dcom.sun.management.jmx
D. None of the mentioned
Answer» B. -Dcom.sun.management
11.

management.MBeanServer

A. javax.management
B. javax.management.MBean
C. none of the mentioned
Answer» C. none of the mentioned
12.

Method, all files in the source directory will be replicated to the destination directory.

A. replicate
B. copy
C. rep
D. none of the mentioned
Answer» B. copy
13.

Spring can also detect and export your MBeans automatically from beans declared in the IoC container and annotated with JMX-specific annotations defined by Spring.

A. True
B. False
Answer» B. False
14.

Connectors to expose your MBeans for remote access over a specific protocol by using a factory bean.

A. MBeanExporter
B. JSR-160
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
15.

Spring supports JMX by allowing you to export any beans in its IoC container as model MBeans.

A. True
B. False
Answer» B. False
16.

There are two main options for scheduling tasks on the Java platform:-

A. JDK Timer
B. Quartz Scheduler
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned