Spring MCQ Quiz Hub

Spring Mcq Set 18

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

This provides a set of diagramming notations that describe a business process. This notation is akin to UML activity diagram.





✅ Correct Answer: 4

A way of letting your process rest in a known condition indefinitely.





✅ Correct Answer: 1

A pause in the action that can only move forward when a known actor or agent in the system moves it forward.





✅ Correct Answer: 2

An aggregation of states, activities, and other types of constructs that serializes them.





✅ Correct Answer: 3

A concurrent execution of multiple threads of execution at the same time, originating from a common thread.





✅ Correct Answer: 4

Each department may have its own task list to complete in order to achieve the goals of the overarching process.





✅ Correct Answer: 3

A decision describes a node that is conditional, based on some logic that you inject.





✅ Correct Answer: 1

To use PostgreSQL, you need to add a the driver library to the classpath.





✅ Correct Answer: 1

<dependency> <groupId>org.jbpm.jbpm4</groupId> <artifactId>jbpm-jpdl</artifactId> <version>4.3</version> </dependency> Dependency for JBPM 4.





✅ Correct Answer: 1

JBPM supports databases such as:-





✅ Correct Answer: 4

To make use of jBPM from within a Spring application context.





✅ Correct Answer: 1

To use jBPM as a stand-alone process server:-





✅ Correct Answer: 2

It’s not too difficult to get jBPM working on JBoss EJB environment.





✅ Correct Answer: 1

JBoss itself supports deploying processes to a directory and loading those, with some configuration.





✅ Correct Answer: 1

jBPM is, fundamentally, a runtime that stores its state and jobs in a database. It uses:-





✅ Correct Answer: 1

To have an annotated class be registered as a Hibernate entity, it needs to be registered with the:-





✅ Correct Answer: 2

Because our jBPM configuration uses Hibernate, we have to configure the :-





✅ Correct Answer: 2

The next bean—the dataSource—is configured entirely at your discretion. The properties are set using properties in the properties file :-





✅ Correct Answer: 3

When we’re integrating with Spring, we modify the transaction-context element and the command-service element.





✅ Correct Answer: 1

The hibernate-session element tells jBPM to reuse an existing Hibernate session:-





✅ Correct Answer: 1

The spring-transaction-interceptor element is a special element to enable jBPM to defer to the TransactionManager defined in our application context.





✅ Correct Answer: 1

jBPM will expose beans using the:-





✅ Correct Answer: 1

jBPM, and indeed most workflow engines, passivate state for you, allowing a process to wait on external events :-





✅ Correct Answer: 1

The method annotated with @PostConstruct will be run after the bean’s been configured to let the user inject custom initialization logic.





✅ Correct Answer: 1

The business process file’s name needs to end in :-





✅ Correct Answer: 3

At the top, we’ve injected some dependencies:





✅ Correct Answer: 3

The class(CustomerServiceImpl) provides a few salient methods:- package com.apress.springrecipes.jbpm.jbpm4.customers; public interface CustomerService { void sendWelcomeEmail(Long customerId); void deauthorizeCustomer(Long customerId); void authorizeCustomer(Long customerId); Customer getCustomerById(Long customerId); Customer createCustomer(String email, String password, String firstName,  String lastName); void sendCustomerVerificationEmail(Long customerId); }





✅ Correct Answer: 4

In the bean, setupProcessDefinitions is run when the bean is created.





✅ Correct Answer: 1

Process definition will reference Spring beans using the JBoss expression language.





✅ Correct Answer: 1

In jBPM, a business process is built using jPDL.





✅ Correct Answer: 1

.In the customerService bean, a client will use createCustomer to create a customer record. <?xml version="1.0" encoding="UTF-8"?> <process name="RegisterCustomer" xmlns="http://jbpm.org/4.0/jpdl"> <start> <transition to="send-verification-email" /> </start> <java name="send-verification-email" expr="#{customerService}" method="sendCustomerVerificationEmail"> <arg> <object expr="#{customerId}" /> </arg> <transition to="confirm-receipt-of-verification-email" /> </java> <state name="confirm-receipt-of-verification-email"> <transition to="send-welcome-email" /> </state> <java name="send-welcome-email" expr="#{customerService}" method="sendWelcomeEmail"> <arg> <object expr="#{customerId}" /> </arg> </java> </process>





✅ Correct Answer: 1

Inside the createCustomer method, we use jBPM to start the business process to track the Customer. This is done with the :- <?xml version="1.0" encoding="UTF-8"?> <process name="RegisterCustomer" xmlns="http://jbpm.org/4.0/jpdl"> <start> <transition to="send-verification-email" /> </start> <java name="send-verification-email" expr="#{customerService}" method="sendCustomerVerificationEmail"> <arg> <object expr="#{customerId}" /> </arg> <transition to="confirm-receipt-of-verification-email" /> </java> <state name="confirm-receipt-of-verification-email"> <transition to="send-welcome-email" /> </state> <java name="send-welcome-email" expr="#{customerService}" method="sendWelcomeEmail"> <arg> <object expr="#{customerId}" /> </arg> </java> </process>





✅ Correct Answer: 1

Once in the java element named send-verification-email, jBPM will invoke the method:-





✅ Correct Answer: 1

Inside authorizeCustomer, the service queries the server for the any processes waiting at the:-





✅ Correct Answer: 3

The authorizeCustomer method also updates the Customer entity, marking it as authorized. From there, execution proceeds to the send-welcome-email java element.





✅ Correct Answer: 1

OSGi—which was formerly known as the:-





✅ Correct Answer: 1

OSGi provides a layer on top of the JVM’s default class loader.





✅ Correct Answer: 1

On top of Spring Dynamic Modules, SpringSource built SpringSource dm Server, which is a server wired from top to bottom with OSGi and Spring.





✅ Correct Answer: 1

OSGi is a framework.





✅ Correct Answer: 1

User component models are:-





✅ Correct Answer: 2

In OSGi, anything used by something else is a state.





✅ Correct Answer: 1

“Service” doesn’t imply any:-





✅ Correct Answer: 4

OSGi bundles are simply standard .jar files with customized MANIFESTs that OSGi consumes at runtime.





✅ Correct Answer: 1

Tool which dynamically interrogates classes for their imports and generates OSGi–compliant entries.





✅ Correct Answer: 3

The plug-in produces OSGi–compliant bundles that work in any container.





✅ Correct Answer: 1

The Bundle-Activator directive describes to the OSGi environment, which class implements :-





✅ Correct Answer: 1

When the bundle begins to load and start, it calls the start method of the:-





✅ Correct Answer: 2

To start using Spring to smooth over some of the minutiae of resource acquisition and to help build more reliable systems in an OSGi environment.





✅ Correct Answer: 2

Spring Dynamic Modules scans our deployed bundles and loads an ApplicationContext (actually, the specific type of the ApplicationContext is OsgiBundleXmlApplicationContext) into memory based on an event, or a trigger.





✅ Correct Answer: 1

You’ll split your OSGi–specific Spring configuration and your plain-vanilla Spring configuration into:-





✅ Correct Answer: 1