I honestly don't know if anyone uses the channel definition files to publish channels into a live portal instance for users to then subscribe to. We use channel definition files to manage all of our channels but we have a weekly early morning maintenance window where we move all of our changes into the production portal and that process involves a standard rolling restart of the portal machines.
-Eric Thomas S. Pangborn wrote:
>From your previous post then, is it still possible to programatically build a channel and its supporting entities, i.e. Categories, Groups having the ChannelRegistryManager update the system with this channel and have it available for use without any caching issues? I believe I could update the ChannelDefinition to create an XML document just as the one is in CChannelManager.In previous version of uPortal did anyone use the Channel Definition XML files to create channels on-the-fly as described in the documentation?I also noted that changing the cache values to very low numbers and waiting did not allow or trigger the system to list the new channel. The server had to be stopped/started to have this happen.Thanks, - Thomas On Wed, 2008-04-09 at 08:19 -0500, Eric Dalquist wrote:Yes, sorry I meant ChannelRegistryManager I got a bit confused switching between the RDBMChannelRegistryStore and ChannelRegistryManager.For a solution that will work correctly in a multi-server environment the more detailed option needs to be implemented, this includes the quick-and-dirty addition of a clearCaches() method which would call .clear() on each of those three caches you listed. The more detailed bit involves changing these caches from locally declared SmartCache instances to framework managed caches.As for your other question about a cache config option, there are a set of org.jasig.portal.ChannelRegistryManager.* properties in portal.properties which configure these caches.-Eric Thomas S. Pangborn wrote:Eric,For the ChannelRegistryStore, I am assuming you are referring to the ChannelRegistryManager? I see in that class it sets up 3 caches:channelRegistryCache, channelTypesCache, and cpdCache There is no ChannelRegistryStore in the code base that I can find.With the solutions listed below as I understand it both would have to be implemented correct?Thomas On Tue, 2008-04-08 at 17:09 -0500, Eric Dalquist wrote:So I didn't think to look, the ChannelDefinition that is being used in that block of code I emailed earlier is apparently a ChannelDefinition that is an internal class of the CChannelManager class.A quick and dirty idea would be to add a .clearCaches() static method on ChannelRegistryStore which calls the .clear() method on each of the three caches that ChannelRegisryStore uses internally. This would not play well in a multi-server environment.A better fix would be to replace the SmartCaches being used with Maps from the CacheFactory service. I might actually be able to take a look at doing this some time in the next week or two or if you (or someone else) is interested in giving it a shot I'm thinking the changes would involve: 1. Replace the static declaration of the three SmartCache instances with an static initialization block 2. The static initialization block would get the portal's ApplicationContext from the PortalApplicationContextLocator.getApplicationContext() method 3. Using the ApplicationContext get the "cacheFactory" bean which is of type CacheFactory. 4. Get three named caches from the CacheFactory for each of the three caches in ChannelRegistryManager. 5. Declare cache configurations in uportal-impl/src/main/resources/properties/ehcache.xml referring to the org.jasig.portal.ChannelRegistryManager properties in portal.properties to determine the appropriate settings.Once this is done the ChannelRegistryManager would be using a standard caching framework and implementing the clearCaches() method mentioned in option one would be safe in a multi-server environment as long as EhCache is configured to be distributed.If someone else is going to tackle this I would be more than happy to lend a hand where I can.Eric Thomas S. Pangborn wrote:In trying this I have started to create a ChannelDefinition. Here are some questions on that:1. How do you obtain the next valid ID for a channel from uPortal? Is there an object that contains that information? 2. the ChannelDefinition Class has no toXML() method as described below. Is there another way to generate an Element from ChannelDefinition?Thanks again, Thomas On Tue, 2008-04-08 at 12:29 -0500, Eric Dalquist wrote:There is a ##uportal channel on the FreeNode IRC network.The RDBMChannelRegistryStore uses plain JDBC and custom caching code. I'm am nearly positive that it isn't a caching issue in RDBMChannelRegistryStore. The problem is very likely that the ChannelRegistryManager needs to be explicitly updated with the new channel. That class does not use a cache. As far as I can tell it just has a reference to a Document in which it holds a structure of all available channels for that uPortal instance. I'm pretty sure the only way that this Document will get updated with your new channel is by calling the following APIs from the code that is creating the new ChannelDefinition.Element channelE = channelDef.toXML(); ChannelRegistryManager.publishChannel(channelE, catIDs, groupMembers, person);As far as I can tell uPortal 2.6 and earlier all behave in the same way here, unless ChannelRegistryManager.publishChannel is called its internal Document is not updated.-Eric Thomas S. Pangborn wrote:Eric,Does the system use hibernate for this caching? We have seen this problem where the Java hibernated objects are not updated, but the underlying database is and the system has no knowledge of the database update until the server is restarted. Is there an IRC channel that I can ping people that are doing development for uPortal to find out more? I see where the uPortal IRC is archived on the JA-SIG wiki page.Also, was this feature working in 2.6? I tried creating an XML file pushed that into properties/chanpub and expected the system to pull this in. I did not see the new channel populate. How did this work in 2.6 or did it? If this was working in 2.6 we might use that for this go around.So from what I can tell now, this feature as it's stated in the documentation does not work.Any suggestions here would be great. I'll also take into consideration your comments below.Thanks again, Thomas On Tue, 2008-04-08 at 09:44 -0500, Eric Dalquist wrote:Sounds like an interesting portlet if you'd be willing to share the code eventually.So publishing the channel as you describe would update the database and the cache that the RDBMChannelRegistryStore uses. CChannelManager and the content subsciber channel both use the ChannelRegistryManager to get the list of available channels and this appears to be a static Document that tracks all available channels so it will need to be updated using that API.I will say that I'm not a big fan of the ChannelRegistryManager, it seems like an extra layer of caching (RDBMChannelRegistryStore uses a cache for ChannelDefinitions already) and a difficult API to work with as manipulating DOMs is never fun. I, and I know a few others, are very interested in re-writing CChannelManager as a portlet and also re-writing the RDBMChannelRegistryStore to use JPA. I would imagine the ChannelRegistryManager would be deprecated with that work. Unfortunately that wouldn't be happening until 3.1 at the earliest so for now you end up having to update the ChannelRegistryManager with any updates to make sure they show up to users.-Eric Thomas S. Pangborn wrote:Eric,I see where this method call should do the update. Is there a caching issue or something that needs to be flushed or call/activated once a new channel has been added? I know that the new information is there. I can see the entry in the database; however, the uPortal UI does not show this update. Any suggestions? Is there something in the code base that needs to be fixed or is there some type of property or preference that can be set in such a way to allow the new channel to show itself?--Here is a little background on what I am trying to accomplish. We need a simplified way to publish content based on existing portlets. We simply need to create a portlet that would let the user identify the base portlet, setup portlet arguments, then create the channel and have it available to the user immediately for use. Our customer base will not have the expertise to enter information for a given channel via the Admin interface for channel addition.With uPortal 2.6 this was quite simply done by creating an XML file and placing this in the properties/chanpub directory. Not having used 2.6 I would assume that the system then automatically created the new 'Channel' on the fly or was there another step involved here as well?Thomas On Tue, 2008-04-08 at 08:52 -0500, Eric Dalquist wrote:Thomas,The information is likely cached in the ChannelRegistryStore. Looking at CChannelManager there is a bit of code that does the following after publishing a channel:Element channelE = channelDef.toXML();ChannelRegistryManager.publishChannel(channelE, catIDs, groupMembers, person);catIDs is a String[] of category IDs the channel is a member of groupMembers is a IGroupMember[] of groups that can render the channel persopn is the IPerson that published the channelI hope that helps and I would also be very interested to see the end result portlet that you're working on, it could be a great example for future framework portlet development.-Eric Thomas S. Pangborn wrote: > This does seem to work; however, once the new channel has been added I must shutdown tomcat and restart in order to see this as part of the channel list. > > Is there a way to import a channel programmatically and then have the system update so that the channel is available without having to restart? >>-- Join your friends and colleagues at JA-SIG 2008 - "Higher Education Solutions: The Community Source Way!" April 27th - 30th, 2008 in St. Paul, Minnesota USA Featuring CAS, DSpace, Fedora, Fluid, Internet2, Kuali, Sakai, uPortal, and more! Information/Registration at: http://www.ja-sig.org/conferences/08spring/index.html Subscribe to the conference blog, The Community Source Way http://jasig2008.blogspot.com <http://jasig2008.blogspot.com/>, for news and updates about the event. Join the Conference networking site at http://ja-sigspring08.crowdvine.com/ You are currently subscribed to [email protected] <mailto:[email protected]> as: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev-- Join your friends and colleagues at JA-SIG 2008 - "Higher Education Solutions: The Community Source Way!" April 27th - 30th, 2008 in St. Paul, Minnesota USA Featuring CAS, DSpace, Fedora, Fluid, Internet2, Kuali, Sakai, uPortal, and more! Information/Registration at: http://www.ja-sig.org/conferences/08spring/index.html Subscribe to the conference blog, The Community Source Way http://jasig2008.blogspot.com <http://jasig2008.blogspot.com/>, for news and updates about the event. Join the Conference networking site at http://ja-sigspring08.crowdvine.com/ You are currently subscribed to [email protected] <mailto:[email protected]> as: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev-- Join your friends and colleagues at JA-SIG 2008 - "Higher Education Solutions: The Community Source Way!" April 27th - 30th, 2008 in St. Paul, Minnesota USA Featuring CAS, DSpace, Fedora, Fluid, Internet2, Kuali, Sakai, uPortal, and more! Information/Registration at: http://www.ja-sig.org/conferences/08spring/index.html Subscribe to the conference blog, The Community Source Way http://jasig2008.blogspot.com <http://jasig2008.blogspot.com/>, for news and updates about the event. Join the Conference networking site at http://ja-sigspring08.crowdvine.com/ You are currently subscribed to [email protected] <mailto:[email protected]> as: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev-- Join your friends and colleagues at JA-SIG 2008 - "Higher Education Solutions: The Community Source Way!" April 27th - 30th, 2008 in St. Paul, Minnesota USA Featuring CAS, DSpace, Fedora, Fluid, Internet2, Kuali, Sakai, uPortal, and more! Information/Registration at: http://www.ja-sig.org/conferences/08spring/index.html Subscribe to the conference blog, The Community Source Way http://jasig2008.blogspot.com <http://jasig2008.blogspot.com/>, for news and updates about the event. Join the Conference networking site at http://ja-sigspring08.crowdvine.com/ You are currently subscribed to [email protected] <mailto:[email protected]> as: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev--Join your friends and colleagues at JA-SIG 2008 - "Higher Education Solutions: The Community Source Way!" April 27th - 30th, 2008 in St. Paul, Minnesota USAFeaturing CAS, DSpace, Fedora, Fluid, Internet2, Kuali, Sakai, uPortal, and more! Information/Registration at: http://www.ja-sig.org/conferences/08spring/index.htmlSubscribe to the conference blog, The Community Source Way http://jasig2008.blogspot.com <http://jasig2008.blogspot.com/>, for news and updates about the event.Join the Conference networking site at http://ja-sigspring08.crowdvine.com/You are currently subscribed to [email protected] as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
smime.p7s
Description: S/MIME Cryptographic Signature
