well - why would you ever want to change the "standard" configuration? by extending the configuration, you gain the ability to keep the defaults and override the ones you need to change.
if you forsee yourself needing this interceptor called by different beans, you're better off defining the configuration in the standardjboss.xml file. while it is "inconvienent", i do see good reasoning for keeping the interceptor stack separate from what's inherited when you extend the configuration. there may be instances where you want to keep your beans always using the same config params (such as min/max values) that are defined in the standard configuration but send them thru completely separate interceptor stacks. -jae -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Giovanni Formenti Sent: Friday, January 09, 2004 9:21 AM To: [EMAIL PROTECTED] Subject: R: [JBoss-user] Where to put an Interceptor class? Duplicating the whole <container-interceptors> it works!! thanks! But there isn't a way to simply adding an interceptor to the chain? This because if there is some standardjboss.xml change it will be not reflected for the session bean "intercepted"... Gio > -----Messaggio originale----- > Da: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] conto di Jae > Gangemi > Inviato: venerdi 9 gennaio 2004 15.04 > A: [EMAIL PROTECTED] > Oggetto: RE: [JBoss-user] Where to put an Interceptor class? > > > > have you tried duplicating the entire Standard Stateful SessionBean > configuration all over again in the standardjboss.xml file instead of > extending it in your jboss.xml file, adding the interceptor to > the stack and changing the configuration name? i have successfully > created interceptors and had them invoked > using this method. > > i'm pretty sure that you can't extend the interceptor stack like > that, and you actually need to recreate all the entries. > > try adding this to your standardjboss.xml file: > > <container-configuration> > <container-name>Try</container-name> > <call-logging>false</call-logging> > > <invoker-proxy-binding-name>stateful-rmi-invoker</invoker-proxy-bindin > g- > name> > <container-interceptors> > > <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</inte > rc > eptor> > > <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor> > > <!-- your interceptor, altho you may want to shift it's location if > you care about > when it's invoked in the chain --> > <interceptor>com.xxx.TryInterceptor</interceptor> > > <!-- CMT --> > <interceptor > transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interc > ep > tor> > <interceptor transaction="Container" > metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interc > ep > tor> > <interceptor > transaction="Container">org.jboss.ejb.plugins.StatefulSessionInstanceI > nt > erceptor</interceptor> > <!-- BMT --> > <interceptor > transaction="Bean">org.jboss.ejb.plugins.StatefulSessionInstanceIntercep > tor</interceptor> > <interceptor > transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor> > <interceptor transaction="Bean" > metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</intercep > tor> > > <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInte > rc > eptor</interceptor> > > <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor> > </container-interceptors> > > <instance-cache>org.jboss.ejb.plugins.StatefulSessionInstanceCache</in > st > ance-cache> > > <persistence-manager>org.jboss.ejb.plugins.StatefulSessionFilePersiste > nc > eManager</persistence-manager> > <container-cache-conf> > > <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cac > he > -policy> > <cache-policy-conf> > <min-capacity>50</min-capacity> > <max-capacity>1000000</max-capacity> > <remover-period>1800</remover-period> > <max-bean-life>1800</max-bean-life> > <overager-period>300</overager-period> > <max-bean-age>600</max-bean-age> > <resizer-period>400</resizer-period> > <max-cache-miss-period>60</max-cache-miss-period> > <min-cache-miss-period>1</min-cache-miss-period> > <cache-load-factor>0.75</cache-load-factor> > </cache-policy-conf> > </container-cache-conf> > <container-pool-conf> > <MaximumSize>100</MaximumSize> > </container-pool-conf> > </container-configuration> > > and then just specify the container configuration name in your > jboss.xml file, and get rid of the inteceptor definitions. ie: just > have this line: > > <configuration-name>Try</configuration-name> > > > i have a very simple working prototype of both a client and server > side interceptor working w/ a stateless session bean (the idea is the > same for a stateful) that i could send you if you're still unable to > get things working. > > -jae > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Giovanni > Formenti > Sent: Friday, January 09, 2004 4:50 AM > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] Where to put an Interceptor class? > > > I readed this doc but I can't understand clearly how to do! > I made the following steps: > 1) Write a class that extends AbstractInterceptor and implements the > invoke > method: > public Object invoke(Invocation invocation) throws Exception { > Object lRet; > System.out.println("LOG!!"); > lRet=getNext().invoke(invocation); > return lRet; > } > 2) Modify jboss.xml with a configuration: > <container-configurations> > <container-configuration extends="Standard Stateful SessionBean"> > <container-name>Try</container-name> > <container-interceptors> > > <interceptor>com.xxx.TryInterceptor</interceptor> > </container-interceptors> > </container-configuration> > </container-configurations> > > and a stateful session bean with that configuration: > <session> > <ejb-name>Application</ejb-name> > <jndi-name>ApplicationBean</jndi-name> > <local-jndi-name>ApplicationLocal</local-jndi-name> > <configuration-name>Try</configuration-name> > </session> > > It don't works! What i miss? I really appreciate any suggestion... > Thanx > > > -----Messaggio originale----- > > Da: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] conto di Sacha > > Labourey > > Inviato: mercoledi 7 gennaio 2004 17.39 > > A: [EMAIL PROTECTED] > > Oggetto: RE: [JBoss-user] Where to put an Interceptor class? > > > > > > > Sorry... but JBoss 3.2 can use interceptor? How?! I'm very > > > interesting about this! > > > > It is possible since JBoss 2.0. > > > > Take a look at conf/standardjboss.xml and the documentation, it > > shows how to write your own JBoss.xml file which includes such a > > stack definition. > > > > Cheers > > > > > > sacha > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Perforce Software. Perforce is > > the Fast Software Configuration Management System offering advanced > > branching capabilities and atomic changes on 50+ platforms. Free > > Eval! > > > http://www.perforce.com/perforce/loadprog.html > > _______________________________________________ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. Perforce is the > Fast Software Configuration Management System offering advanced > branching capabilities and atomic changes on 50+ platforms. Free Eval! > http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. Perforce is the > Fast Software Configuration Management System offering advanced > branching capabilities and atomic changes on 50+ platforms. Free Eval! > http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user