February 2006
« March 2006 | Main | August 2005 »Multilingual Documentum Content in WebLogic Portal
Tuesday, February 14, 2006
Handling multilingual content from Documentum in WebLogic Portal using a little known Documentum configuration setting.
Let me preface this entry by stating I am not a Documentum guru and I may not be able to answer detailed follow-up questions. Having said that, a colleague of mine, Scott Hammer, recently pointed me to a lesser known feature in the Documentum JDBC driver that can be quite useful when dealing with multilingual content.
Documentum provides a variety of ways to integrate with WebLogic Portal, if you are using Documentum Site Caching Services (SCS) and choose to integrate to Portal in a loosely coupled way using the Documentum JDBC driver, you may have run into an issue handling multilingual content. As I understand it, Documentum handles multilingual content by publishing the content to separate SCS sites under the same structure and file names. Unfortunately, with the Documentum JDBC driver the contentURL that points to the site where the content is fetched from is in a global properties file. This means that on the surface it appears that you cannot setup multiple repositories to handle each language.
Fortunately Scott knew about an override that enables you to specify the contentURL on a per connection pool basis enabling the configuration of multiple repositories in the VCR. This override is covered in the Documentum JDBC driver guide but is easy to miss. Essentially, when configuring the Documentum JDBC driver in a connection pool in config.xml, you can specify contentURL in the properties attribute of the connection pool. When specified, this local setting will override the global setting enabling you to specify the content location on a pool by pool basis. You can then configure multiple repositories in the Portal Admin tool with each repository pointing to a different Documentum connection pool.
Posted by Gerald Nunn at 4:02 PM | Categories: WebLogic | Permalink |
Page Flows and Spring Dependency Injection
Tuesday, February 07, 2006
Using Spring Dependency Injection with WebLogic Workshop Java Page Flows
I was at a client recently that wanted to use Spring Dependency Injection (DI) with Java Page Flows (JPF). Essentially they wanted to inject various service objects into JPF controllers in a way that was as seamless as possible. The challenge though is that JPF controllers are created by the framework and it is not currently possible to have Spring create them thus an alternative means must be found.
After some research we found that it was possible to DI an existing class with Spring using some methods from the autowiring facilities it provides. Specifically, there is a method called applyBeanPropertyValues in AutowireCapableBeanFactory that enables bean settings in Spring to be applied to an existing instance.
After searching the Spring support forums, I found this post (http://plainvanilla.typepad.com/spring/2005/06/configuring_arb.html) from one of the Interface 21 guys that shows how to access this interface from an existing ApplicationContext through the use of some judicious casting. Essentially it is as done as per the code below:
AutowireCapableBeanFactory factory = (AutowireCapableBeanFactory)((ConfigurableApplicationContext)context).getBeanFactory();
factory.applyBeanPropertyValues(this, this.getClass().getName());
Now that we know how to inject an existing class it is merely a matter of applying to the controller. You can choose to do this on an as needed basis or create a base page flow controller to centralize the logic and extend your existing controllers from this class.
While admittingly a perfect solution would involve no code change, this solution comes pretty close. If you opt to centralize the injection code into a base controller class, developers only need to make one change to support DI in their page flow controllers
Posted by Gerald Nunn at 4:02 PM | Categories: | Permalink |
