Announcement Announcement Module
No announcement yet.
Grails for Standalone applications Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grails for Standalone applications

    Hi all,

    I am new to Grails , I have been asked to use Grails for our project. I am not sure whether to use it or not. because we are not a web application. Ok we are using spring and hibernate within tomcat, but there are no user interfaces. We have JMS listeners listening to messages from IBM MQ and senders sending messages. We only use a servlet to start listeners and senders to collaborate with JMS bus. Not sure if Grails can help us. Only reason why we are asked to use it is that people think it will increase our productivity where we can avoid creating hbm files and spring beans. Is it something that Grails focuses on?

  • #2
    Although a large part of Grails is related to handling HTTP traffic (whether that be HTML, JSON, XML, RMI over HTTP), you don't have to use that aspect. If the application works against a database, then you can benefit from GORM. Also, you can benefit from the JMS plugin and potentially the ActiveMQ plugin for integration/functional testing. Finally, you could very easily create a simple administrative user interface that gives you a browser based view of what's happening inside your application. It may not be essential for the running of the application, but it can make analysis of problems much easier.

    Hope that helps.


    • #3
      Thank you for your prompt response , I am unable to setup Servlet that would be used to populate bootstrap application configuration parameters , like listeners and queues. I am not sure if there is something like web.xml where we can setup Servlet, I am to the point unable to get information about that in books.


      • #4
        I would investigate the JMS plugin: you may find it has an easy way of setting up listeners and queues without you manually doing it.

        If that isn't sufficient for you, you might also want to initialise listeners and queues in grails-app/conf/BootStrap.groovy.

        Again, if that doesn't do what you need, you can always run 'grails install-templates' and add the servlet and servlet listener definitions to src/templates/war/web.xml.


        • #5
          Thank you very much for this useful information, third option worked for me.

          The reasons I cannot use JMS plugin is that I have to rely on a database of configurations based on envoirnment we have almost 12 different envoirnments where we set our different IBM MQ QueueMangers, this information is based on which sub-domian in the organization we are connecting from , I know we can use Envoirnment functionality from JMS. Secondly cannot use default JMSTemplate which I should be able to use with CachingConnectionFactory, but CachingConnectionFactory does not have maxLiveTime parameterization on connections, which is a big requirement for our case , otherwise firmwide connection Chopper will chop our connections after few minutes.