0

I have an issue in a new devkit Project where the following @ValidateConnection method is failing to be called (but my @processor methods are called fine when requested in the flows)

 @ValidateConnection
    public boolean isConnected() {
        return isConnected;
    }

I thought that the above should be called to check whether to call the @Connect method.

I think it is because I am using a non default category (Components) for the connector

@Category(name = "org.mule.tooling.category.core", description = "Components")

And the resulting Behavoir is different to what I am used to with DevKit in Cloud connector mode.

I guess I will need to do checks in each @processor for now to see if the initialization logic is done, as there doesn't seem to be an easy way to run a one time config.

EDIT_________________ I actually tried porting it back to a cloud connector @cat and the same behaviour, maybe its an issue with devkit -DarchetypeVersion=3.4.0, I used 3.2.x somthing before and things worked a bit better

4

1 回答 1

1

@ValidateConnection带注解的方法在生成类的方法@Connector结束时调用。如果您寻找谁在打电话给您的参考资料,您应该能够确认这一点。makeObject()*ConnectionFactoryisConnected()

所以不,您不需要执行检查,它应该为您自动完成。

一定还有其他遗漏......你有带@ConnectionIdentifier注释的方法吗?

PS。@Category在 Studio 中,注释纯粹是为了美观。

于 2013-07-11T15:56:25.450 回答