1
Integration Testing for Java EE Applications on Oracle WebLogic Server 12c Done Right This is a Title Slide with Picture slide ideal for including a picture with a brief title, subtitle and presenter information. To customize this slide with your own picture: Right-click the slide area and choose Format Background from the pop-up menu. From the Fill menu, click Picture and texture fill. Under Insert from: click File. Locate your new picture and click Insert. To copy the Customized Background from Another Presentation on PC Click New Slide from the Home tab's Slides group and select Reuse Slides. Click Browse in the Reuse Slides panel and select Browse Files. Double-click the PowerPoint presentation that contains the background you wish to copy. Check Keep Source Formatting and click the slide that contains the background you want. Click the left-hand slide preview to which you wish to apply the new master layout. Apply New Layout (Important): Right-click any selected slide, point to Layout, and click the slide containing the desired layout from the layout gallery. Delete any unwanted slides or duplicates. To copy the Customized Background from Another Presentation on Mac Click New Slide from the Home tab's Slides group and select Insert Slides from Other Presentation… Navigate to the PowerPoint presentation file that contains the background you wish to copy. Double-click or press Insert. This prompts the Slide Finder dialogue box. Make sure Keep design of original slides is unchecked and click the slide(s) that contains the background you want. Hold Shift key to select multiple slides. Apply New Layout (Important): Click Layout from the Home tab's Slides group, and click the slide containing the desired layout from the layout gallery. Reza Rahman Java EE, GlassFish, WebLogic Evangelist at Oracle Aslak Knutsen Arquillian Project Lead, Senior Software Engineer at Red Hat 2
Java EE 7 Java Enterprise Platform DEVELOPER PRODUCTIVITY Java EE 7 MEETING ENTERPRISE DEMANDS Batch Concurrency Simplified JMS More annotated POJOs Less boilerplate code Cohesive integrated platform WebSockets JSON Servlet 3.1 NIO REST 3
Java EE 7 APIs JSP EL 3* JSF 2.2* JAX-RS 2* +JSON-P +WebSocket Servlet 3.1* CDI 1.1* Bean Validation 1.1* Interceptors 1.2* +Concurrency +Batch JTA 1.2* EJB 3.2* JMS 2* JavaMail JPA 2.1* JCA 4
Java EE 7 APIs in WebLogic 12.1.3 JSP EL 3* JSF 2.2* JAX-RS 2* +JSON-P +WebSocket Servlet 3.1* CDI 1.1* Bean Validation 1.1* Interceptors 1.2* +Concurrency +Batch JTA 1.2* EJB 3.2* JMS 2* JavaMail JPA 2.1* JCA 5
Java EE 7 APIs in WebLogic 12.1.3 JSP EL 3* JSF 2.2* JAX-RS 2* +JSON-P +WebSocket Servlet 3.1* CDI 1.1* Bean Validation 1.1* Interceptors 1.2* +Concurrency +Batch JTA 1.2* EJB 3.2* JMS 2* JavaMail JPA 2.1* JCA Enabled by Default 6
PRE_CLASSPATH Adjustment/Patch Java EE 7 APIs in WebLogic 12.1.3 JSP EL 3* JSF 2.2* JAX-RS 2* +JSON-P +WebSocket Servlet 3.1* CDI 1.1* Bean Validation 1.1* Interceptors 1.2* +Concurrency +Batch JTA 1.2* EJB 3.2* JMS 2* JavaMail PRE_CLASSPATH Adjustment/Patch JPA 2.1* JCA Enabled by Default 7
Deployed as Shared Library PRE_CLASSPATH Adjustment/Patch Java EE 7 APIs in WebLogic 12.1.3 Deployed as Shared Library JSP EL 3* JSF 2.2* JAX-RS 2* +JSON-P +WebSocket Servlet 3.1* CDI 1.1* Bean Validation 1.1* Interceptors 1.2* +Concurrency +Batch JTA 1.2* EJB 3.2* JMS 2* JavaMail PRE_CLASSPATH Adjustment/Patch JPA 2.1* JCA Enabled by Default 8
WebLogic 12.1.3 Maven Support Maven plug-in Installation, domain configuration, start/stop, configure resources, deploy/un-deploy Maven artifacts Installed in a local repository Automatic synchronization Maven archetypes Development productivity
Arquillian so you can rule the code, not the bugs!
Flexible Flexible
Extensible
How does this all work?
Setup Maven, Gradle, Ant(+ivy)
<dependencyManagement> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.1.5.Final</version> <scope>import</scope> <type>pom</type> </dependency> </dependencyManagement>
<dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency>
<profile> <id>arq-weblogic</id> <dependencies> <dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-wls-remote-12.1</artifactId> <version>${version.weblogic}</version> </dependency> </dependencies> </profile>
ShrinkWrap Deployment + Resolver + Descriptors
ShrinkWrap.create(JavaArchive.class) .addClasses(x) .addPackages(x.z) ShrinkWrap.create(WebArchive.class) .addAsLibraries(x) .addAsWebInfResource(x) .setWebXML(z) ShrinkWrap.create(EnterpriseArchive.class) .addAsModules(war, jar) .setApplicationXML(x)
Maven.resolver() .loadPomFromFile("pom.xml") .resolve("x:y", "x:y:1.0") .withTransitivity() .asFile()
Descriptors.create(WebAppDescriptor.class) .metadataComplete(true) .version("2.5") .createServlet() .servletName(EchoServlet.class.getSimpleName()) .servletClass(EchoServlet.class.getName()).up() .createServletMapping() .urlPattern(EchoServlet.URL_PATTERN).up() .exportAsString()
https://github.com/m-reza-rahman/testing-weblogic WebLogic/Java EE Integration Testing Demo https://github.com/m-reza-rahman/testing-weblogic 28
Q&A
Learning More Java EE 7 Tutorials http://docs.oracle.com/javaee/7/tutorial/doc/home.htm Java EE 7 and More on WebLogic 12.1.3 (The Aquarium) https://blogs.oracle.com/theaquarium/entry/java_ee_7_support_comes Arquillian http://arquillian.org 30
31
32