Applying for developer approval : iBATIS plugin

View: New views
5 Messages — Rating Filter:   Alert me  

Applying for developer approval : iBATIS plugin

by Brian Sanders-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all.  I've written a Grails plugin for iBATIS (http://ibatis.apache.org).  This plugin implements the Table Data Gateway (http://martinfowler.com/eaaCatalog/tableDataGateway.html) pattern.

A new target "create-gateway sample" generates a gateway class "/grails-app/gateways/
SampleGateway.groovy" and a corresponding iBATIS map file "/grails-app/gateways/sample.xml".  For each operation in the map file (e.g., '<select id="getValue">'), a corresponding method is dynamically generated on the gateway class (e.g., SampleGateway.getValue(...))

This plugin doesn't currently interact with GORM (other than sharing a datasource definition); rather, it's a complementary approach.  Before releasing the plugin, I need to complete the user's guide.  Other than that, it's ready for 0.1

A related question: would it be appropriate to use the package name "org.codehaus.groovy.grails.plugins.ibatis"?


--
Brian Sanders

Re: Applying for developer approval : iBATIS plugin

by Jean Barmash :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Brian,

I've seen the package org.grails.plugins.* being suggested, and adopted that convention myself. 

Jean


From: Brian Sanders <brian.j.sanders@...>
To: dev@...
Sent: Sat, October 17, 2009 11:21:32 AM
Subject: [grails-dev] Applying for developer approval : iBATIS plugin

Hi all.  I've written a Grails plugin for iBATIS (http://ibatis.apache.org/).  This plugin implements the Table Data Gateway (http://martinfowler.com/eaaCatalog/tableDataGateway.html) pattern.

A new target "create-gateway sample" generates a gateway class "/grails-app/gateways/
SampleGateway.groovy" and a corresponding iBATIS map file "/grails-app/gateways/sample.xml".  For each operation in the map file (e.g., '<select id="getValue">'), a corresponding method is dynamically generated on the gateway class (e.g., SampleGateway.getValue(...))

This plugin doesn't currently interact with GORM (other than sharing a datasource definition); rather, it's a complementary approach.  Before releasing the plugin, I need to complete the user's guide.  Other than that, it's ready for 0.1

A related question: would it be appropriate to use the package name "org.codehaus.groovy.grails.plugins.ibatis"?


--
Brian Sanders

Re: Applying for developer approval : iBATIS plugin

by Peter Ledbrook :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> A related question: would it be appropriate to use the package name
> "org.codehaus.groovy.grails.plugins.ibatis"?

I am currently promoting a convention of "grails.plugins.<plugin
name>" for classes that are visible to the end user, and
"org.codehaus.groovy.grails.plugins.<plugin name>" for internal
classes. This mirrors the emerging convention in the Grails classes
themselves.

Cheers,

Peter

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Applying for developer approval : iBATIS plugin

by Graeme Rocher-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Approved

On Sat, Oct 17, 2009 at 6:21 PM, Brian Sanders
<brian.j.sanders@...> wrote:

> Hi all.  I've written a Grails plugin for iBATIS
> (http://ibatis.apache.org).  This plugin implements the Table Data Gateway
> (http://martinfowler.com/eaaCatalog/tableDataGateway.html) pattern.
>
> A new target "create-gateway sample" generates a gateway class
> "/grails-app/gateways/
> SampleGateway.groovy" and a corresponding iBATIS map file
> "/grails-app/gateways/sample.xml".  For each operation in the map file
> (e.g., '<select id="getValue">'), a corresponding method is dynamically
> generated on the gateway class (e.g., SampleGateway.getValue(...))
>
> This plugin doesn't currently interact with GORM (other than sharing a
> datasource definition); rather, it's a complementary approach.  Before
> releasing the plugin, I need to complete the user's guide.  Other than that,
> it's ready for 0.1
>
> A related question: would it be appropriate to use the package name
> "org.codehaus.groovy.grails.plugins.ibatis"?
>
>
> --
> Brian Sanders
>



--
Graeme Rocher
Head of Grails Development
SpringSource - Weapons for the War on Java Complexity
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



WebFlow and hibernate session

by nycsailor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am working on the hibernate-filter plugin.  I have a grails filter
where I apply filters by using the hibernate session.  

before = {
   def session = grailsApplication.mainContext.sessionFactory.currentSession
   DefaultHibernateFiltersHolder.defaultFilters.each {name ->
       session.enableFilter(name)
   }
}

Works great unless running webflow where I get the  message that the
hibernate session has not been initialized.  I believe that I have found
that in the controller that the hibernate session is stored in the flow.

So, I decided to try to grab the flow in the filter and attempt to find
the current session there.  Problem is, I can't figure out how to get
the flow in the filter.

Does anyone know if I am on the right track, or how to get the flow
scope in the filter?



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email