4 Replies Latest reply on Nov 18, 2014 4:41 PM by ryanrutan

    Jive Java SDK Question

    javapan

      Thanks so much to Ryan Rutan! The java sdk works like a charm. I am able to build a new tile based off ExampleTableTile to bring in a list of internal tickets and display it on Jive.

      I ran into few questions hope you can give me some pointers:

      1. scope of the tile: seems the default is "singleton". If I added multiple tiles to different jive places, once the configuration for one tile is change, the other tile also changed. How can we make the change so that each tile instance has its own setting (assignment group for tickets)?

      2. Each time I run the above command line (mvn -DclientUrl=http://your.clienturl -Dport=8090 clean package install tomcat7:run), I have to uninstall the addon and reinstall the addon again to make the addon work.  Is it normal or is there another way to build and run the addon server without invalidate the addon integration?

      3. Run the addon in a standalone tomcat server. I see the war file is created after the build. Can I deploy the war to tomcat webapps folder? The context would have "jive-sdk-jersey-example". Should I rename it to "ROOT" or modify serviceContext? If so, how to modify the serviceContext?

       

      Thansk a lot Ryan!

        • Re: Jive Java SDK Question
          javapan

          Ryan answered the above questions in the following :

          Re: A Quick Update on the Jive Java Jersey SDK ... Hoping People Will Be Happy =)

           

          1. scope of the tile: seems the default is "singleton". If I added multiple tiles to different jive places, once the configuration for one tile is change, the other tile also changed. How can we make the change so that each tile instance has its own setting (assignment group for tickets)?

          This is just the base implementation.  If you want to preserve instances of the various tiles .... and put additional filtration/selectors to target specific instances, does that help?

          2. Each time I run the above command line (mvn -DclientUrl=http://your.clienturl -Dport=8090 clean package install tomcat7:run), I have to uninstall the addon and reinstall the addon again to make the addon work.  Is it normal or is there another way to build and run the addon server without invalidate the addon integration?

          This is normal, as the default persistence is In Memory only.  What I do for quick turn-around is to use the Reconnect to Service functionality.  If not, then I would setup a JPA connection to a data store where you can persist this metadata between restarts.

          3. Run the addon in a standalone tomcat server. I see the war file is created after the build. Can I deploy the war to tomcat webapps folder? The context would have "jive-sdk-jersey-example". Should I rename it to "ROOT" or modify serviceContext? If so, how to modify the serviceContext?

          You should be able to deploy it to ROOT, but I haven't tried it yet.  I dropped the WAR it generated into an auto-deploy and it worked a few months ago ... but haven't tried it recently.

           

          Thansk a lot Ryan!

            • Re: Jive Java SDK Question
              javapan

              Hi Ryan Rutan

              1. scope of the tile: seems the default is "singleton". If I added multiple tiles to different jive places, once the configuration for one tile is change, the other tile also changed. How can we make the change so that each tile instance has its own setting (assignment group for tickets)?

              This is just the base implementation.  If you want to preserve instances of the various tiles .... and put additional filtration/selectors to target specific instances, does that help?

               

              Hi Ryan,

              Could you please give me some pointers on how to change the scope? an example will help. Thanks Ryan

               

              • Re: Jive Java SDK Question
                javapan

                2. Each time I run the above command line (mvn -DclientUrl=http://your.clienturl -Dport=8090 clean package install tomcat7:run), I have to uninstall the addon and reinstall the addon again to make the addon work.  Is it normal or is there another way to build and run the addon server without invalidate the addon integration?

                This is normal, as the default persistence is In Memory only.  What I do for quick turn-around is to use the Reconnect to Service functionality.  If not, then I would setup a JPA connection to a data store where you can persist this metadata between restarts.

                 

                Hi Ryan,

                do you have plan to setup JPA connection to a data store so that metadata can be persisted, which is desired for a production environment. Thanks Ryan

                  • Re: Jive Java SDK Question

                    There is already a JPA implementation provided in the SDK...all you have to do is configure your JPA context and modify the spring injections.  The JPA  references of the providers should be commented out in the spring config.   Let me know if you don't see it, I haven't played with that in a while