ICE09 . playing with java, scala, groovy and spring .

Playing with Spring

Sample Questions for EIwS-1.x-certification-study-guide

Posted by ice09 on January 16, 2012

Currently, I am preparing for the Enterprise Integration with Spring 1.x Certification, with the Study Guide.

After having tried to google some of the questions, I had to realize that nobody did try to answer the questions (at least openly). Therefore, I will give it a try.
Please be aware that these answers are based on my unterstanding of the question topics. It is not very likely, but they may even be completely false. If they are, please tell me…

Topics by Subject Area

Remoting

General

  • The concepts involved with Spring Remoting on both server- and client-side Configuration and Exposition of Business Services declaratively (with no code changes) using exporters Support of different protocols in a consistent way: RMI, EJB, HttpInvoker, Hessian/Burlap Usage of remote Business Services transparently on client side (using proxy mechanisms with FactoryBeans) Proxy can be injected as Business Service interface, client does not know the service call is remote
  • The benefits of Spring Remoting over traditional remoting technologies No dependency on a concrete Remoting Technology (is abstracted by exception coversion and automatic proxy creation) No adherence to a particular Remoting Technology Binding etc. is done by Spring Exporters Remoting is done by Proxies generated from FactoryBeans
  • The remoting protocols supported by Spring RMI(-IIOP), Stateless EJB, HttpInvoker, Hessian/Burlap

RMI-based Spring Remoting

  • How Spring Remoting-based RMI is less invasive than plain RMI Through the use of the RmiProxyFactoryBean and the RmiServiceExporter Spring supports both traditional RMI (with java.rmi.Remote interfaces and java.rmi.RemoteException) and transparent remoting via RMI invokers (with any Java interface) Client does not have to deal with RemoteExceptions, Server does not have to extend RMI classes

Spring HTTP Invoker

  • How client and server interact with each other The HttpInvokerProxy (client) sends a POST request (transparently by calling a method invocation) to the HttpInvokerServiceExporter (server) using Java serialization (HTTP as transport protocol)

(Reference)

Web Services

General

  • How do Web Services compare to Remoting and Messaging Web Services are interoperable across several platforms. Source and Destination can change, there are no direct dependencies (as with remote method invocation (RPC)). Web Services (can) resemble Document-based messaging more than RPC with loose coupling as a result, but both styles (RPC vs. document-oriented approach) exist. Spring supports the document-oriented Contract-first approach.

Spring Web Services

  • The approach to Spring Web Service that Spring-WS supports Spring-WS uses the Contract-first approach (start with XSD/WSDL) instead of annotating pre-existing methods
  • The Object-to-XML frameworks supported by Spring-OXM JAXB1/2, Castor, XMLBeans, XStream and JiBX
  • The strategies supported to map requests to endpoints Message Payload, SOAP Action Header, WS-Adressing and XPath General Request Processing (Message Dispatcher -> Endpoint Mapping -> Endpoint Adapter -> Endpoint) PayloadRootAnnotationMethodEndpointMapping and SoapActionAnnotationMethodEndpointMapping Request -> MessageDispatcher -> EndpointMapping -> EndpointInvocationChain -> Endpoint and Interceptors
  • Of these strategies, how does @PayloadRoot work exactly? Sample: @PayloadRoot(localPart = "orderRequest", namespace = "http://samples") @ResponsePayload public Order getOrder(@RequestPayload OrderRequest orderRequest) { For this to work the PayloadRootAnnotationMethodEndpointMapping must be registered as a bean
  • The functionality offered by the WebServiceTemplate WebServiceTemplate simplifies client Web Service (SOAP) access in the usual Spring Template way (cp. JDBCTemplate, JMSTemplate) The main functionality is sending an XML Source and receiving an XML Result This functionality can be extended by the usual callback mechanisms (eg. access SOAP Header) Can use different protocols (JMS, Mail, XMPP)

Web Services Security

  • The underlying WS-Security implementations supported by Spring-WS XML Web Services and Security (http://xwss.java.net/), integration with XwsSecurityInterceptor Uses callback mechanisms and policy configuration files Integration with Spring Security (http://static.springsource.org/spring-security/site/)
  • How key stores are supported by Spring-WS for use with WS-Security Usage of KeyStoreFactoryBean (Properties password (Keystore) and location (JKS-File)) Usage of KeyStoreCallbackHandler (with private key password)

RESTFul services with Spring-MVC

General

  • The main REST principles With usage of identifiable resources, an uniform interface (GET, HEAD, PUT, POST, DELETE) is used to represent the (abstract) resources with different representations (HTML, XML, PDF, etc.). A control flow (client state transition) is introduced by using hypermedia links as return values.

REST support in Spring-MVC

  • Spring-MVC is an alternative to JAX-RS, not an implementation
  • The @RequestMapping annotation, including URI template support Sample: @Controller @RequestMapping("/edit{number}") public class EditForm { @RequestMapping(method = RequestMethod.POST) public String processSubmit( @ModelAttribute("edit") Edit edit, BindingResult result, SessionStatus status) {
  • The @RequestBody and @ResponseBody annotations @RequestBody annotated parameters for access to the HTTP request body. Parameter values are converted to the declared method argument type using HttpMessageConverters. If the method is annotated with @ResponseBody, the return type is written to the response HTTP body. The return value will be converted to the declared method argument type using HttpMessageConverters (a href='http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html'>Reference)
  • The functionality offered by the RestTemplate Similar to the WebServiceTemplate The central class for client-side HTTP access. It simplifies communication with HTTP servers, and enforces RESTful principles. It handles HTTP connections, leaving application code to provide URLs (with possible template variables) and extract results. (a href='http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/client/RestTemplate.html'>Reference)

JMS with Spring

General

  • Where can Spring-JMS applications obtain their JMS resources from The container provides the resource, which can be a standalone JMS provider (eg. ActiveMQConnectionFactory) or an application server (jee:jndi-lookup jndi-name="...") - is valid for ConnectionFactory and Destination
  • The functionality offered by Spring's JMS message listener container, including the use of a MessageListenerAdapter through the 'method' attribute in the element With the a MessageListener call be called, by specifying the method attribute, any POJO can be used (automatically a MessageListenerAdapter is generated for the POJO by the framework)
  • The functionality offered by the JmsTemplate JmsTemplate delegates to MessageConverter and DestinationResolver. MessageConverter: String -> TextMessage, Serializable -> ObjectMessage, Map -> MapMessage, byte[] -> BytesMessage DynamicDestinationResolver or JndiDestinationResolver, simple one-method-interface Also ConnectionFactory necessary to create a JmsTemplate

Transactions

Local JMS Transactions with Spring

  • How to enable local JMS transactions with Spring's message listener container acknowledge="transacted"
  • If and if so, how is a local JMS transaction made available to the JMSTemplate sessionTransacted=true ConnectionFactoryUtils.doGetTransactionalSession
  • How does Spring attempt to synchronize a local JMS transaction and a local database transaction DataSourceTransactionManager: commit only after successful database commit
  • The functionality offered by the JmsTransactionManager send and receive multiple messages in one transaction works together with declarative transaction management

JTA and Two-phased commit transactions with Spring

  • What guarantees does JTA provide that local transactions do not provide ACID guarantees: Atomic, Consistent, Isolated, Durable ...but on local transactions only in a single resource

Batch processing with Spring Batch

General

  • Main concepts (Job, Step, Job Instance, Job Execution, Step Execution, etc. Job has its own identity, has steps, has an execution (which has start and stop times and status) Client starts JobLauncher, which starts Job (use JobParameters to create JobInstance, which has JobExecutions - same for steps) JobLauncher also updates Job metadata in JobRepository Reader (single entry) and Writer (chunked) with FieldSetMapper
  • The interfaces typically used to implement a chunk-oriented Step implements ItemWriter with write(List list) method
  • How and where state can be store Is handled by JobRepository (ie. in a database or a Map)
  • What are job parameters and how are they used JobParameters can parameterize a JobInstance (eg. schedule.date)
  • What is a FieldSetMapper and what is it used for Can be used to customzie an FlatFileItemReader, which uses it to map values (with LineTokenizer and FieldSetMapper)

Spring Integration

General

  • Main concepts (Messages, Channels, Endpoint types) Message Channel, Message Endpoint, Pipes and Filters, Message Router, Message Translator Framework polls to an event source and notifies/invokes services as necessary (SoC) Rules: A Message is sent by an Endpoint, Endpoints are connected by Channels and receive Messages from them A Message is MessageHeaders and a payload - is immutable always A MessageChannel is used for decoupling, with optional buffereing MessageChannel can be Point-to-Point, Publish-subscribe and Pollable Types of MessageEndpoints (which are the filters in "pipes-and-filter"): Channel Adapter (Jms, File, Method invokation), Service Activator (Invoke Method and wrap result), Gateway (two way integration, sync, inbound waits for reply, outbound waits for response)
  • How to programmatically create new Messages Use MessageBuilder (is immutable, uses Builder pattern)
  • Using chains and bridges Chain subsumes several different Endpoints in one channel Uses same Thread, Transaction Boundaries, etc.

Synchronous vs. asynchronous message passing

  • The different Channel types and how each of them should be used Subscribable (Direct, Publish Subscribe) Pollable (Queue, Priority, Rendezvous)
  • The corresponding effects on things like transactions and security Context is lost by switching to queued channel (sync -> async)
  • The need for active polling and how to configure that Active components are sometimes necessary (JMS, File, etc.) Configure poller on the Enpoints

(Reference)

Advertisements

13 Responses to “Sample Questions for EIwS-1.x-certification-study-guide”

  1. Ahmed said

    Hi ice09,

    Thanks for your helpful post,
    I am started to study for the exam too, and i can’t find any useful materials or study notes or exam experience to start from!, it will be great if you send me what the resources or your study plan to start with…

    Thanks
    Ahmed

    • ice09 said

      Hi Ahmed,

      I had no special resources, all this is taken from the course material – I think you have to visit the course to be allowed to take the exam.
      The other most interesting resource was: http://www.springsource.com/files/core-spring-3.0-certification-study-guide_0.pdf
      Also, what helped me a lot was exercising the labs again – all in all I prepared one week after work (and a weekend) and it was probably even too much, I got 88%. If you “just want to pass”, I would focus on the certification study guide and the course material and do a lab if you think you did not understand to topic completely (in my case this was with different transaction types and Spring’s support for them).
      All in all, it’s like they always say, the exam is not easy, but fair. Plus, I am pretty sure, if you have already used Spring Integration during some project it will be a lot easier.

      Best luck,

      ice09

    • Hello guys,

      I am David the Creator of Spring Mock Exams.

      As you may know Pivotal has updated the Spring Certification from Version 3.2 to Version 4.0.

      So at http://www.springmockexams.com we did the upgrade too!

      Soon our Web Simulator will be released with a new set of Spring Certification Questions that reflect the new CoreSpringV4.0 exam certification.

      Stay tuned and visit: https://www.springmockexams.com/spring/mock/spring-mock-exam.html to see the new CoreSpringV4.0 exam simulator.

      David.

  2. MS said

    Hi,
    Have you passed the exam already?
    Best regards,
    MS

    • ice09 said

      Hi MS,

      yes, I passed it with 88%, so I probably learnt too much 🙂 But I am quite happy, as it is often said, the exam was difficult, but fair.
      However, it was really a mess getting the real certificate (as a PDF!) – it took more than four months to actually get it and the first draft wasn’t even correct which I had to tell them.
      I got the feeling that not many people have done the certification up to now.

      Good luck, if you prepare with the training material and do the labs once again you are really well prepared for the exam.

  3. cula said

    Hi,
    Nice to finally see some resources online about the EIwS, so thank you. I am also making my way through the slides and the study guide, but it’s hard to get a feeling for which are the most important areas (i.e. what is the share of the questions in the exam). Are you willing and able to provide some feedback?
    Thanks again,

    • ice09 said

      Hi,

      sorry, it’s difficult to answer these questions, because a) it’s quite long ago now and b) there is no real focus in the share of questions. I’ve had the feeling that it’s quite important to know exactly the kind of transactions Spring (Integration) supports. But, as I wrote, doing the labs definitely qualifies for passing the exam.

      Best luck!

  4. praveen said

    Hi ice09,

    I am planning to take Spring Enterprise Integration certification. I am not very good in topics like Spring batch and Spring integration. I know you dont remember much about the exam. But still I m asking, do these two topics i.e. Spring integration and Spring batch form major part in exam.

    Is it just sufficient to read the slides? Is it needed to go through documentation in spring source site ? Did you refer any books ?

    You are the only person, I know, who has cleared this exam. So please reply.

    Regards,
    Praveen

    • ice09 said

      Hi Praveen,

      definitely Spring Batch and Spring Integration are part of the exam, especially Spring Integration. I would say just reading the slides is not enough, I really advise you to do the labs which came with the course material. Otherwise, there is good material (like real source samples) linked on the Spring Integration home page, so it might be enough to read the slides, then see/examine the samples and read the Spring reference on the topic, which is in general really good.
      However, the best tip is to just use the framework yourself, which can be done most easily by doing the labs.

      Best luck!

      • praveen said

        Thanks a lot ice09. I have one more doubt. Is Spring Integration skill having good demand in job market ? Is it being used in any projects? Why I’m asking this is, I have not worked on either Spring Integration or Spring batch, so want to make sure if spending time on these subjects would be worth in terms of career growth?

      • ice09 said

        Hi Praveen,

        sorry, can’t help you on this topic, as far as I am concerned, I am not actively using Spring Integration right now. Also, I’d say that commercial solutions like Tibco are more prevalent, but since Spring has a great market share, this might change.
        However, as for the technology I’d say it’s worth it, since Spring Batch, Spring Integration etc. are quite well designed and are working great (as far as I can tell).

  5. Hi,
    I am David one of the creator of https://www.springmockexams.com.
    First all, I want to thank you for your post!

    Thanks you guys also for sharing your experience and knowledge!

    At Spring Mock Exams we provide free and a full solution to prepare your Spring Core Certification as well. If you are interested you can just head over:
    https://www.springmockexams.com.

    The website is also packed with general information regarding the exam.
    I would be really greatfull to you if you could visit our web-site and if you think is a good resource to prepare for a Spring Certification it would be great if you could add a link\mention on your website too.

    If you just want to try our free Spring Certification Questions you can visit: https://www.springmockexams.com/spring/free/free-test.html

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: