简体   繁体   English

Teiid / Wildfly 中的 CDI 和用户定义函数 (UDF)

[英]CDI and User Defined Functions (UDF) in Teiid / Wildfly

Recently I began working with Teiid and Wildfly.最近我开始与 Teiid 和 Wildfly 合作。 I have a user defined function (UDF) that adds custom functionality to Teiid, and it works as expected.我有一个用户定义的函数 (UDF),它向 Teiid 添加了自定义功能,它按预期工作。 However, I need to modify it further and would like to use CDI to inject a bean from the Wildfly app server.但是,我需要进一步修改它,并希望使用 CDI 从 Wildfly 应用服务器注入一个 bean。 I know that the UDF isn't managed by the container (it is a Wildfly module with an associated module.xml file deployed as a jar), so I've added (what seemed to be) necessary dependencies to module.xml but it doesn't work.我知道 UDF 不是由容器管理的(它是一个 Wildfly 模块,带有一个关联的 module.xml 文件部署为 jar),所以我已经添加(似乎是)必要的依赖项到 module.xml 但它不起作用。

Is it possible to use CDI in a UDF with Teiid / Wildfly, and if so, how?是否可以在带有 Teiid / Wildfly 的 UDF 中使用 CDI,如果可以,如何使用?

No, it is not possible.不,这是不可能的。 although Teiid is a resident of WildFly it is using the infrastructure of WildFly for a variety of features like transactions, security, data sources, administration etc. It is not part of JEE or anything, so there is no direct way to do this.尽管 Teiid 是 WildFly 的常驻者,但它使用 WildFly 的基础设施来实现各种功能,例如交易、安全、数据源、管理等。它不是 JEE 或任何东西的一部分,因此没有直接的方法可以做到这一点。 If you want to explain what you are trying to accomplish, maybe we can offer any further guidance on alternatives.如果您想解释您要实现的目标,也许我们可以提供有关替代方案的任何进一步指导。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM