简体   繁体   中英

Wiring portlets with a grails application context, or deploying multiple portlets through grails?

I currently have a grails application that gets deployed through liferay. Now, I need to build some portlets, but I'm unsure what the best way is to expose the grails domain objects and services.

How would you go about doing this?

Ideally, I could either build my portlets directly within the grails application or somehow wire the two together when deployed in different wars.

Some weeks ago I published an GateIn Portlet plugin that updates the PortletsPlugin and make it usable with last Grails (1.3.7) and Spring MVC (3.0.5). If you like, I can back-port my changes to the original portles plug-in and its LR implementation. Which LR version do you use?

How to expose you domain objects its more about your environment design choice. The simplest way is to have all portlets in inside a single grails app. If your portlets are not logical connected together do it in separate wars. But if you use the domain classes just to output some text, maybe is better for performance and administration to write a standard Java servlet that uses only GORM.

There is the Portlets Plugin but it is not actively maintained (I wrote the original version a couple of years ago). You could have a go with that and upgrade/patch where required.

Otherwise I guess you could create a standard Java portlets WAR and call grails via REST?

cheers

Lee

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM