12 Replies Latest reply on Mar 26, 2004 4:26 PM by jae

    Adding an RSS feed (block) to Nukes

    Antonio Newbie

      Hi,

      Could someone direct me towards some info that could guide me in adding blocks in Nukes containing (an)other RSS feeds. I have tried adding additional mbean blocks in the jboss-service.xml (within the nukes-rss.ear of course...) but the info displayed is the same as the original rss block.

      Thanks in advance,

      Antonio

        • 1. Re: Adding an RSS feed (block) to Nukes
          jae Master

          could you post your jboss-service.xml file (be sure to place it in a "

          " block.


          • 2. Re: Adding an RSS feed (block) to Nukes
            jae Master

            grr - that didn't work out correctly.

            make sure you put the xml in a "[ code ]" (remove the spaces between the [ and ]) block so it shows up properly.

            • 3. Re: Adding an RSS feed (block) to Nukes
              Antonio Newbie

              Thanks!,

              Here it goes:

              <?xml version="1.0" encoding="UTF-8"?>
              <server>
               <mbean code="org.jboss.nukes.addons.modules.rss.RSSModule"
               name="nukes.modules:name=rss"
               xmbean-dd=""
               xmbean-code="org.jboss.nukes.component.NukesMBean">
               <depends>nukes.modules:name=core</depends>
               <constructor>
               <arg type="boolean" value="true"/>
               </constructor>
               <xmbean>
               <attribute name="Security">
               <security>
               <permission group="Admins" pattern="::" level="ADMIN"/>
               </security>
               </attribute>
               </xmbean>
               </mbean>
               <mbean code="org.jboss.nukes.addons.modules.rss.blocks.RSSBlock"
               name="nukes.blocks:name=rss,feed=sf.net"
               xmbean-dd=""
               xmbean-code="org.jboss.nukes.component.NukesMBean">
               <depends>nukes.modules:name=core</depends>
               <xmbean>
               <constructor>
               <arg type="boolean" value="true"/>
               </constructor>
               <attribute name="Title">SourceForge</attribute>
               <attribute name="Side">2</attribute>
               <attribute name="Weight">3</attribute>
               <attribute name="FeedURL" description="set the RSS feed URL">http://sourceforge.net/export/rss2_sfnews.php?feed</attribute>
               <attribute name="Security">
               <security>
               <permission group="Admins" pattern="::" level="ADMIN"/>
               </security>
               </attribute>
               </xmbean>
               </mbean>
              
              
              <!-- Additional RSS block starts here -->
              
              
              
               <mbean code="org.jboss.nukes.addons.modules.rss.blocks.RSSBlock"
               name="nukes.blocks:name=rss,feed=slashdot.org"
               xmbean-dd=""
               xmbean-code="org.jboss.nukes.component.NukesMBean">
               <depends>nukes.modules:name=core</depends>
               <xmbean>
               <constructor>
               <arg type="boolean" value="true"/>
               </constructor>
               <attribute name="Title">Slashdot</attribute>
               <attribute name="Side">2</attribute>
               <attribute name="Weight">4</attribute>
               <attribute name="FeedURL" description="set the RSS feed URL">http://slashdot.org/index.rss</attribute>
               <attribute name="Security">
               <security>
               <permission group="Admins" pattern="::" level="ADMIN"/>
               </security>
               </attribute>
               </xmbean>
               </mbean>
              
              
              </server>
              
              
              
              


              Please advise what am I doing wrong... (I am sure is something obvious enough)

              Thanks and regards,

              Antonio.

              • 4. Re: Adding an RSS feed (block) to Nukes
                jae Master

                i'm not seeing anything wrong w/ what you did. i cut and paste your entry directly into my file and it shows the slashdot content correctly.

                when you first created the block, how did you do it? did you change all the values and then deploy? or did you just change one value as a test, deploy, and after you saw it was working, went back and changed the rest?

                • 5. Re: Adding an RSS feed (block) to Nukes
                  Antonio Newbie

                  Hi,

                  Thanks for the quick answer.

                  Let me expand a bit what I have done:

                  1) I picked yesterdays CVS snapshot and performed a clean install (BTW I am using a PostgreSQL DB)

                  2) All the other components compiled, deployed and seem to be working OK.

                  3) Build the RSS component (was not build automatically)

                  4) Deployed the nukes-rss.ear file to my nukes deploy directory: C:\jboss-3.2.3\server\default\nukes

                  5) Confirmed that the feed from SF showed and the "details" link at the bottom worked correctly.

                  6) Removed (thus undeployed) the nukes-rss.ear file from the deploy directory

                  7) I then extracted the jboss-service.xml from the nukes-rss.ear and copy-pasted the original SF block and changed the new block's info for the corresponding slashdot's.

                  8) Reinserted the jboss-service.xml file back into the nukes-rss.ear

                  9) Redeploy

                  10) I get the two SF blocks (no slashdot)

                  I have tried several things including deleteing the RSS entries in the nuke_services_attributes table in the db to no avail

                  I hope that with this detailed explanation you may be able to troubleshoot my case...

                  Thnaks in advance,

                  Antonio

                  • 6. Re: Adding an RSS feed (block) to Nukes
                    jae Master

                    hrm - i'm at a loss then b/c i cut and paste your exact block and deployed w/o any issues.

                    i was thinking that database values could have been overriding what was in the jboss-service.xml file.

                    when you did the delete, was nukes/jboss running at the time, or did you shut it down and then do the delete?

                    • 7. Re: Adding an RSS feed (block) to Nukes
                      Joachim Van der Auwera Expert

                      Just a guess, but have you changed the mbean name?

                      Apart from that, for the second block, you just just throw the -service.xml fil in the nukes deploy dir, no need to have the rest of the ear in there twice.

                      Joachim

                      • 8. Re: Adding an RSS feed (block) to Nukes
                        jae Master

                        the mbean name was correctly changed. in his rss feed, the name is "nukes.blocks:name=rss,feed=slashdot.org", which is correct.

                        i also don't think he's deploying the ear twice, he's just editting the jboss-service.xml file contained inside, however you are correct. he could just create an "rss-slashdot-service.xml" file that has his deployment descriptor in it and drop that in to the "nukes" directory.

                        i would recommend changing the constructor argument to "false" so the block is not written to the database, shut down nukes, and clear out any rss information from the db and restart.

                        if the problem still exists, i'll try to add some additional debug information to the module to help diagnos, but as i stated before, i cut and paste his exact xml block and it deployed and showed the correct feeds w/o issue.

                        the nukes-rss.ear is pretty small - ageiron, could you email me the ear you created and i'll try it on my end.

                        • 9. Re: Adding an RSS feed (block) to Nukes
                          Antonio Newbie

                          Hi all,

                          Setting all the constructor arguments to "false" in the xml did the trick. just before restarting jboss I deleted all rss entries in the db.

                          Now I can see both RSS feeds and the "details" link for both show the correct details for each feed.

                          What could be causing the problem? could it be related that I am using postgresql?

                          Thanks !

                          Antonio

                          • 10. Re: Adding an RSS feed (block) to Nukes
                            jae Master

                            yeah - there is an "issue" when you set the persistent to true in the -service.xml file.

                            the problem is that the entry if an entry is found in the database, it overrides the entry in the xml file. this behavior may be intentional b/c nukes does allow you to create blocks w/o editting those files (altho that does not currently work for the rss module), but i think there should be a way to allow for both to exist.

                            right now the solution is to set the persistant attribute to false and make sure any references in the db are cleaned out.

                            let me know if you have any other issues, etc w/ the module. it was the first one i wrote to get my feet wet w/ nukes and eventually over time i hope it will grow.

                            • 11. Re: Adding an RSS feed (block) to Nukes
                              Antonio Newbie

                              Thanks!

                              Now I can move forward !

                              I have added a few other feeds without any problem (and followed triathlon98 recomendation of creating a separate xxx-service.xml file with the additional entries in the deploy directory)

                              I appreciate the time and efford the nukes team have already put into it. I have seen it evolve and I like very much what I see.

                              Thank you all very much!

                              Antonio

                              • 12. Re: Adding an RSS feed (block) to Nukes
                                jae Master

                                cool - one thing tho, put those xxx-service.xml files in the "nukes" directory (server/nukes) - best to keep everything consistent. only the "core" nukes.ear belongs in the deploy dir, everything else goes in the "nukes" dir for now.