[jboss-user] [JBoss Portal] - Creating a CMS interceptor

frontline do-not-reply at jboss.com
Mon Sep 10 14:53:04 EDT 2007


I'm trying to add my own interceptor in addition to the ones already in use (like the ACL interceptor).
I have added the mbean stuff in the cms's jboss-service.xml as was stated in the instructions.
But a few problems:

- how can I get jboss to find my mbean class from my own portal .war file, so that I don't have to copy the classes under jboss lib-directories?
This is so I can use eg. a Singleton from both my webapp and the mbean.

- How can I integrate spring into this? I tried to use spring's mbean exporter to export the mbean. It shows up in the JMX console but the CMS service doesnt find it (NOTYETINSTALLED error)?

I exported the bean with the name "portal:service=Interceptor,type=Cms,name=Test"

And this is from jboss-service.xml:

  |  <!--  interceptor factory where all cms interceptors are registered -->
  |    <mbean
  |       code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
  |       name="portal:service=InterceptorStackFactory,type=Cms"
  |       xmbean-dd=""
  |       xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
  |       <xmbean/>
  |       <depends-list optional-attribute-name="InterceptorNames">
  |          <depends-list-element>portal:service=Interceptor,type=Cms,name=Test</depends-list-element>
  | 	   <depends-list-element>portal:service=Interceptor,type=Cms,name=ACL</depends-list-element>
  |          <depends-list-element>portal:service=Interceptor,type=Cms,name=ApprovalWorkflow</depends-list-element>
  |       </depends-list>
  |    </mbean> 
  | 
  | 

If the above isn't possible, what is the "best practice" for creating cms interceptors that use the same code (and database access etc.) that your webapp does?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082740#4082740

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082740



More information about the jboss-user mailing list