SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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?
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 

Kürzlich hochgeladen (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

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