What I am wondering is, could something else also be calling the DAO and
passing in an ID of 0? Remember that the before advice will run before EVERY
call to update or delete in the DAO. In other words, it's possible that you
are looking at two different method invocations against the DAO, one where
the ID is 0 and one where it is not. To confirm, you might try writing to a
log file or application variable to store how many times and what values are
being used when the before advice runs.
Since ColdSpring doesn't have anything to do with how you invoke your
service from within the advice, something else has to be going on.
On 8/28/07, Mike Fransblow <[EMAIL PROTECTED]> wrote:
>
> Hi Brian,
>
> What I mean is that when I inspect the value of what is passed once it
> arrives at the service, the value has become zero. When I inspect it
> prior to passing it off to the service, it has the expected value (not
> zero)
>
> auditDelete() is only being called by AuditBeforeAdvice.cfc. In fact,
> the only reference to the AuditService is within AuditBeforeAdvice. It's
> really weird, I can't for the life of me figure out where the value
> changes when passing from the advice to the service.
>
> In case this helps, here is the CS config, w/ obvious masking to CFC
> paths and names;
>
> <bean id="DAOTarget" class="xxx.DAO">
> <constructor-arg name="DSN">
> <value>${DSN}</value>
> </constructor-arg>
> </bean>
>
> <bean id="AuditService" class="xxx.AuditService" />
>
> <bean id="AuditBeforeAdvice" class="xxx.AuditBeforeAdvice">
> <property name="AuditService">
> <ref bean="AuditService" />
> </property>
> </bean>
>
> <bean id="AuditAdvisor"
> class="coldspring.aop.support.NamedMethodPointcutAdvisor">
> <property name="advice">
> <ref bean="AuditBeforeAdvice" />
> </property>
> <property name="mappedNames">
> <value>update,delete</value>
> </property>
> </bean>
>
> <bean id="DAO" class="coldspring.aop.framework.ProxyFactoryBean">
> <property name="target">
> <ref bean="DAOTarget" />
> </property>
> <property name="interceptorNames">
> <list>
> <value>AuditAdvisor</value>
> </list>
> </property>
> </bean>
>
> thanks for any insight/advice (ignore bad pun)
>
>
>
>