SlideShare a Scribd company logo
1 of 27
Download to read offline
Grails Enterprise
Integration Strategies

Dave Klein
Contegix
Beyond Managed Hosting
2
Use the coupon code “javaone” for a 30% discount
             http://groovymag.com




                                                   3
Beta version available now at http://pragprog.com




                                                    4
Birds of a Feather




                     5
Grails [buzzword] [buzzword] Strategies

   What do we mean by Enterprise Integration?




                                                6
7
Java Enterprise Edition




               J
                   E      E



                              8
JEE   JEE


JEE   JEE                JEE


            JEE    JEE




                               9
Why Bother?
Why not leave well enough alone?




                                   10
Grails: More Than Just a Cool Framework

>   Undeniable productivity gains
>   Built on top of proven technologies
>   Less code means less bugs
>   Allows you to embrace change
>   Reduce developer turnover (who would quit a Grails job?)
>   Simple and painless deployment



                                                               11
Itʼs a Really Cool
    Framework!




                     12
Integration Strategies

>   Calling EJB Session Beans from a Grails App
    •   EJB 2
    •   EJB 3
>   Accessing JNDI Resources from a Grails App
    •   Using JNDI Datasources
    •   Other JNDI Resources
>   Legacy Databases
    •   GORM DSL
    •   Annotations


                                                  13
Integration Strategies

>   Calling Grails Actions from Non-Grails Apps
    •   From the server side using wget or curl
    •   From the client using AJAX

>   Java Message Service
>   Reuse Existing Spring Beans
>   Reuse Existing Hibernate Entities
>   What else?


                                                  14
Calling an EJB 2 Session Bean From Grails

In app/grails-app/conf/spring/resources.groovy
beans = {
  ejbJndi(org.springframework.jndi.JndiTemplate){
    environment = [
      "java.naming.factory.initial":"weblogic.jndi.WLInitialContextFactory",
      "java.naming.provider.url" : "t3://some.enterprise.server:7001",
      "java.naming.security.principal" : "dave",
      "java.naming.security.credentials" : "1234"
    ]
  }
  empSession(org.springframework.ejb.access.
             SimpleRemoteStatelessSessionProxyFactoryBean){
    jndiName = "EmpSession"
    businessInterface = "com.enterprise.some.ejb.session.EmpSession"
    jndiTemplate = ref("ejbJndi")
  }
}



                                                                               15
Calling an EJB 3 Session Bean From Grails

In app/grails-app/conf/spring/resources.groovy
beans = {
  ejbJndi(org.springframework.jndi.JndiTemplate){
    environment = [
      "java.naming.factory.initial" : "weblogic.jndi.WLInitialContextFactory",
      "java.naming.provider.url" : "t3://some.enterprise.server:7001"
      "java.naming.security.principal" : "dave",
      "java.naming.security.credentials" : "1234" ]
  }

    empSession(org.springframework.jndi.JndiObjectFactoryBean){
      jndiName = "CoverageSession#org.foo.app.ejb.session.IEmpSessionRemote"
      jndiTemplate = ref("ejbJndi")
    }
}




                                                                               16
Integration Strategies

>   Calling EJB Session Beans from Grails Services
    •   EJB 2
    •   EJB 3
>   Accessing JNDI Resources from a Grails App
    •   Using JNDI Datasources
    •   Other JNDI Services
>   Legacy Databases
    •   GORM DSL
    •   Annotations


                                                     17
JNDI Datasources: Too Easy Not To Use
 In app/grails-app/conf/DataSource.groovy

 dataSource{
     jndiName = “java:comp/env/jdbc/EnterpriseData”
 }


 Or in app/grails-app/conf/spring/resources.groovy

 beans = {
   dataSource(org.springframework.jndi.JndiObjectFactoryBean){
       jndiName = “java:comp/env/jdbc/EnterpriseData”
   }
 }




                                                                 18
Other JNDI Resources

In app/grails-app/conf/spring/resources.groovy
beans = {

    jndi(org.springframework.jndi.JndiTemplate){
      environment = [
        "java.naming.factory.initial" : "weblogic.jndi.WLInitialContextFactory",
        "java.naming.provider.url" : "t3://some.enterprise.server:7001"
        "java.naming.security.principal" : "dave",
        "java.naming.security.credentials" : "1234" ]
    }

}




                                                                              19
Integration Strategies

>   Calling EJB Session Beans from a Grails App
    •   EJB 2
    •   EJB 3
>   Accessing JNDI Resources from a Grails App
    •   Using JNDI Datasources
    •   Other JNDI Services
>   Legacy Databases
    •   GORM DSL
    •   Annotations


                                                  20
TABLE BK01
Column Name Date Type
ID_BK_PK NUMBER
BK_TITLE VARCHAR2(100)
BK_AUTHOR VARCHAR2(100)
BK_PGS NUMBER
ID_PUB_FK NUMBER
SEQUENCE ID_BK_PK_SEQ
class Book {
   String title
   String author
   Integer pages
   Publisher publisher
   static belongsTo = Publisher
    static mapping = {
       table 'BK01'
       columns{
          id column: 'ID_BK_PK'
          title column: 'BK_TITLE'
          author column: 'BK_AUTHOR'
          pages column: 'BK_PGS'
          publisher column: 'ID_PUB_FK'
       }
       id generator: 'sequence', params:[sequence:'ID_BK_PK_SEQ']
    }
}
                                                                    21
@
Or you can use annotations

      (if you really want to)

                                22
Brief Tangent on How to Sneak Introduce
      Groovy and Grails Into The Enterprise
>   Unit Testing
>   Utility Scripts
>   Internal Web Applications
>   Prototypes
>   JDBC -> GSQL
>   XML Processing
>   Itʼs easier to get forgiveness than permission
>   Success Sells!
                                                     23
Integration Strategies

>   Calling Grails Actions from Non-Grails Apps
    •   From the server side using wget or curl

    •   From the client using AJAX

>   Java Message Service
>   Reuse Existing Spring Beans
>   Reuse Existing Hibernate Entities
>   What else?

                                                  24
>   Calling Grails Actions from Non-Grails Apps

>   REST
    • URL Mapping DSL
>   SOAP
    • Plugins for XFire, Axis, SpringWS and more
>   Plain Old HTTP Call
>   Execute process in Grails
>   Return data - HTML, XML, JSON
    • Grails Converters are awesome!
                                                   25
Integration Strategies

>   Calling Grails Actions from Non-Grails Apps
    •   From the server side using wget or curl

    •   From the client using AJAX

>   Java Message Service
>   Reuse Existing Spring Beans
>   Reuse Existing Hibernate Entities
>   What else?

                                                  25
                                                  26
Dave Klein
dave.klein@contegix.com
Blog: dave-klein.blogspot.com
Twitter: daveklein

More Related Content

What's hot

JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5Payara
 
Spring design-juergen-qcon
Spring design-juergen-qconSpring design-juergen-qcon
Spring design-juergen-qconYiwei Ma
 
Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]Gaurav Gupta
 
Introducing Workflow Architectures Using Grails - Greach 2015
Introducing Workflow Architectures Using Grails - Greach 2015Introducing Workflow Architectures Using Grails - Greach 2015
Introducing Workflow Architectures Using Grails - Greach 2015Rubén Mondéjar Andreu
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascriptDsixE Inc
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Michael Kurz
 
Service Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C ZiegelerService Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C Ziegelermfrancis
 
Service oriented web development with OSGi
Service oriented web development with OSGiService oriented web development with OSGi
Service oriented web development with OSGiCarsten Ziegeler
 
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit SydneyAutoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit SydneyAmazon Web Services
 
Nuxeo - OpenSocial
Nuxeo - OpenSocialNuxeo - OpenSocial
Nuxeo - OpenSocialThomas Roger
 
What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?gedoplan
 

What's hot (12)

JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
Spring design-juergen-qcon
Spring design-juergen-qconSpring design-juergen-qcon
Spring design-juergen-qcon
 
Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]
 
Introducing Workflow Architectures Using Grails - Greach 2015
Introducing Workflow Architectures Using Grails - Greach 2015Introducing Workflow Architectures Using Grails - Greach 2015
Introducing Workflow Architectures Using Grails - Greach 2015
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)
 
Service Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C ZiegelerService Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C Ziegeler
 
Service oriented web development with OSGi
Service oriented web development with OSGiService oriented web development with OSGi
Service oriented web development with OSGi
 
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit SydneyAutoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
 
Nuxeo - OpenSocial
Nuxeo - OpenSocialNuxeo - OpenSocial
Nuxeo - OpenSocial
 
What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?
 

Viewers also liked

Intro to personality types
Intro to personality typesIntro to personality types
Intro to personality typesPaul Wozney
 
Kiersey Temperament Sorter
Kiersey Temperament SorterKiersey Temperament Sorter
Kiersey Temperament SorterChristy Nichols
 
The Baby’S Guide To Media Study
The Baby’S Guide To Media StudyThe Baby’S Guide To Media Study
The Baby’S Guide To Media StudyGuy Stanley
 
MBTI Personality Keirsey 16 Temperaments
MBTI Personality Keirsey 16 TemperamentsMBTI Personality Keirsey 16 Temperaments
MBTI Personality Keirsey 16 Temperamentsbryanat
 
16 different personality types
16 different personality types16 different personality types
16 different personality typesRinky Soni
 
Types of personalities and traitsPersonality development
Types of personalities and traitsPersonality developmentTypes of personalities and traitsPersonality development
Types of personalities and traitsPersonality developmentdrangelosmith
 
Best Careers for Your Personality Type MBTI
Best Careers for Your Personality Type MBTIBest Careers for Your Personality Type MBTI
Best Careers for Your Personality Type MBTIChristine Shine
 
Personality development & Types of Personality
Personality development & Types of PersonalityPersonality development & Types of Personality
Personality development & Types of PersonalityNitin Shekapure
 
Personality development- A PATH TO SUCCESS
Personality development- A PATH TO SUCCESSPersonality development- A PATH TO SUCCESS
Personality development- A PATH TO SUCCESSsree navya
 

Viewers also liked (15)

Intro to personality types
Intro to personality typesIntro to personality types
Intro to personality types
 
The 16 type patterns
The 16 type patternsThe 16 type patterns
The 16 type patterns
 
Kiersey Temperament Sorter
Kiersey Temperament SorterKiersey Temperament Sorter
Kiersey Temperament Sorter
 
The Baby’S Guide To Media Study
The Baby’S Guide To Media StudyThe Baby’S Guide To Media Study
The Baby’S Guide To Media Study
 
MBTI Personality Keirsey 16 Temperaments
MBTI Personality Keirsey 16 TemperamentsMBTI Personality Keirsey 16 Temperaments
MBTI Personality Keirsey 16 Temperaments
 
16 different personality types
16 different personality types16 different personality types
16 different personality types
 
Types of personalities and traitsPersonality development
Types of personalities and traitsPersonality developmentTypes of personalities and traitsPersonality development
Types of personalities and traitsPersonality development
 
Best Careers for Your Personality Type MBTI
Best Careers for Your Personality Type MBTIBest Careers for Your Personality Type MBTI
Best Careers for Your Personality Type MBTI
 
Personality Types
Personality  TypesPersonality  Types
Personality Types
 
Personality development & Types of Personality
Personality development & Types of PersonalityPersonality development & Types of Personality
Personality development & Types of Personality
 
Personality development- A PATH TO SUCCESS
Personality development- A PATH TO SUCCESSPersonality development- A PATH TO SUCCESS
Personality development- A PATH TO SUCCESS
 
Personality
PersonalityPersonality
Personality
 
Presentation On Personality
Presentation On PersonalityPresentation On Personality
Presentation On Personality
 
Personality ppt
Personality pptPersonality ppt
Personality ppt
 
PERSONALITY DEVELOPMENT
PERSONALITY DEVELOPMENTPERSONALITY DEVELOPMENT
PERSONALITY DEVELOPMENT
 

Similar to Grails Integration Strategies

Groovygrailsnetbeans 12517452668498-phpapp03
Groovygrailsnetbeans 12517452668498-phpapp03Groovygrailsnetbeans 12517452668498-phpapp03
Groovygrailsnetbeans 12517452668498-phpapp03Kevin Juma
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Jared Burrows
 
Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Previewgraemerocher
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best PracticesBurt Beckwith
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsBurt Beckwith
 
Easy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsEasy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsJack-Junjie Cai
 
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...ddrschiw
 
不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopconsam chiu
 
Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)Ontico
 
Google cloud functions
Google cloud functionsGoogle cloud functions
Google cloud functionsPéter Nagy
 
Groovy & Grails for Spring/Java developers
Groovy & Grails for Spring/Java developersGroovy & Grails for Spring/Java developers
Groovy & Grails for Spring/Java developersPeter Ledbrook
 
Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016Alvaro Sanchez-Mariscal
 
Making the Most of Your Gradle Builds
Making the Most of Your Gradle BuildsMaking the Most of Your Gradle Builds
Making the Most of Your Gradle BuildsEgor Andreevich
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleSkills Matter
 
Microservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud PlatformMicroservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud PlatformSunnyvale
 

Similar to Grails Integration Strategies (20)

Groovygrailsnetbeans 12517452668498-phpapp03
Groovygrailsnetbeans 12517452668498-phpapp03Groovygrailsnetbeans 12517452668498-phpapp03
Groovygrailsnetbeans 12517452668498-phpapp03
 
Grails 101
Grails 101Grails 101
Grails 101
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)
 
Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Preview
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best Practices
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in Grails
 
Easy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsEasy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applications
 
Ad111
Ad111Ad111
Ad111
 
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
 
不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon
 
Js tacktalk team dev js testing performance
Js tacktalk team dev js testing performanceJs tacktalk team dev js testing performance
Js tacktalk team dev js testing performance
 
Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)
 
Everything as a code
Everything as a codeEverything as a code
Everything as a code
 
Google cloud functions
Google cloud functionsGoogle cloud functions
Google cloud functions
 
Groovy & Grails for Spring/Java developers
Groovy & Grails for Spring/Java developersGroovy & Grails for Spring/Java developers
Groovy & Grails for Spring/Java developers
 
Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016
 
Making the Most of Your Gradle Builds
Making the Most of Your Gradle BuildsMaking the Most of Your Gradle Builds
Making the Most of Your Gradle Builds
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
Microservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud PlatformMicroservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud Platform
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Grails Integration Strategies

  • 1. Grails Enterprise Integration Strategies Dave Klein Contegix Beyond Managed Hosting
  • 2. 2
  • 3. Use the coupon code “javaone” for a 30% discount http://groovymag.com 3
  • 4. Beta version available now at http://pragprog.com 4
  • 5. Birds of a Feather 5
  • 6. Grails [buzzword] [buzzword] Strategies What do we mean by Enterprise Integration? 6
  • 7. 7
  • 9. JEE JEE JEE JEE JEE JEE JEE 9
  • 10. Why Bother? Why not leave well enough alone? 10
  • 11. Grails: More Than Just a Cool Framework > Undeniable productivity gains > Built on top of proven technologies > Less code means less bugs > Allows you to embrace change > Reduce developer turnover (who would quit a Grails job?) > Simple and painless deployment 11
  • 12. Itʼs a Really Cool Framework! 12
  • 13. Integration Strategies > Calling EJB Session Beans from a Grails App • EJB 2 • EJB 3 > Accessing JNDI Resources from a Grails App • Using JNDI Datasources • Other JNDI Resources > Legacy Databases • GORM DSL • Annotations 13
  • 14. Integration Strategies > Calling Grails Actions from Non-Grails Apps • From the server side using wget or curl • From the client using AJAX > Java Message Service > Reuse Existing Spring Beans > Reuse Existing Hibernate Entities > What else? 14
  • 15. Calling an EJB 2 Session Bean From Grails In app/grails-app/conf/spring/resources.groovy beans = { ejbJndi(org.springframework.jndi.JndiTemplate){ environment = [ "java.naming.factory.initial":"weblogic.jndi.WLInitialContextFactory", "java.naming.provider.url" : "t3://some.enterprise.server:7001", "java.naming.security.principal" : "dave", "java.naming.security.credentials" : "1234" ] } empSession(org.springframework.ejb.access. SimpleRemoteStatelessSessionProxyFactoryBean){ jndiName = "EmpSession" businessInterface = "com.enterprise.some.ejb.session.EmpSession" jndiTemplate = ref("ejbJndi") } } 15
  • 16. Calling an EJB 3 Session Bean From Grails In app/grails-app/conf/spring/resources.groovy beans = { ejbJndi(org.springframework.jndi.JndiTemplate){ environment = [ "java.naming.factory.initial" : "weblogic.jndi.WLInitialContextFactory", "java.naming.provider.url" : "t3://some.enterprise.server:7001" "java.naming.security.principal" : "dave", "java.naming.security.credentials" : "1234" ] } empSession(org.springframework.jndi.JndiObjectFactoryBean){ jndiName = "CoverageSession#org.foo.app.ejb.session.IEmpSessionRemote" jndiTemplate = ref("ejbJndi") } } 16
  • 17. Integration Strategies > Calling EJB Session Beans from Grails Services • EJB 2 • EJB 3 > Accessing JNDI Resources from a Grails App • Using JNDI Datasources • Other JNDI Services > Legacy Databases • GORM DSL • Annotations 17
  • 18. JNDI Datasources: Too Easy Not To Use In app/grails-app/conf/DataSource.groovy dataSource{ jndiName = “java:comp/env/jdbc/EnterpriseData” } Or in app/grails-app/conf/spring/resources.groovy beans = { dataSource(org.springframework.jndi.JndiObjectFactoryBean){ jndiName = “java:comp/env/jdbc/EnterpriseData” } } 18
  • 19. Other JNDI Resources In app/grails-app/conf/spring/resources.groovy beans = { jndi(org.springframework.jndi.JndiTemplate){ environment = [ "java.naming.factory.initial" : "weblogic.jndi.WLInitialContextFactory", "java.naming.provider.url" : "t3://some.enterprise.server:7001" "java.naming.security.principal" : "dave", "java.naming.security.credentials" : "1234" ] } } 19
  • 20. Integration Strategies > Calling EJB Session Beans from a Grails App • EJB 2 • EJB 3 > Accessing JNDI Resources from a Grails App • Using JNDI Datasources • Other JNDI Services > Legacy Databases • GORM DSL • Annotations 20
  • 21. TABLE BK01 Column Name Date Type ID_BK_PK NUMBER BK_TITLE VARCHAR2(100) BK_AUTHOR VARCHAR2(100) BK_PGS NUMBER ID_PUB_FK NUMBER SEQUENCE ID_BK_PK_SEQ class Book { String title String author Integer pages Publisher publisher static belongsTo = Publisher static mapping = { table 'BK01' columns{ id column: 'ID_BK_PK' title column: 'BK_TITLE' author column: 'BK_AUTHOR' pages column: 'BK_PGS' publisher column: 'ID_PUB_FK' } id generator: 'sequence', params:[sequence:'ID_BK_PK_SEQ'] } } 21
  • 22. @ Or you can use annotations (if you really want to) 22
  • 23. Brief Tangent on How to Sneak Introduce Groovy and Grails Into The Enterprise > Unit Testing > Utility Scripts > Internal Web Applications > Prototypes > JDBC -> GSQL > XML Processing > Itʼs easier to get forgiveness than permission > Success Sells! 23
  • 24. Integration Strategies > Calling Grails Actions from Non-Grails Apps • From the server side using wget or curl • From the client using AJAX > Java Message Service > Reuse Existing Spring Beans > Reuse Existing Hibernate Entities > What else? 24
  • 25. > Calling Grails Actions from Non-Grails Apps > REST • URL Mapping DSL > SOAP • Plugins for XFire, Axis, SpringWS and more > Plain Old HTTP Call > Execute process in Grails > Return data - HTML, XML, JSON • Grails Converters are awesome! 25
  • 26. Integration Strategies > Calling Grails Actions from Non-Grails Apps • From the server side using wget or curl • From the client using AJAX > Java Message Service > Reuse Existing Spring Beans > Reuse Existing Hibernate Entities > What else? 25 26