I am getting this discussion to dev@ list.
Actually, plugin interface is so generic (means start, shutdown etc.) , so it
is necessary to add some special methods for other plugins work correctly.
For example, while I was adding support for JMS beans, I will add another
interface method into the plugin interface, "addJmsBean()." So whenever, there
is an injection point for JMS components, plugins creates a new JMS bean and
add it to the container.
Code: In DefinitionUtil class
public static void addImplicitComponentForInjectionPoint(InjectionPoint
injectionPoint)
{
.....
if(injectionPointType instanceof Class)
{
List<OpenWebBeansPlugin> plugins =
PluginLoader.getInstance().getPlugins();
for(OpenWebBeansPlugin plugin : plugins)
{
if(plugin.addJMSBean(injectionPoint))
{
break;
}
}
}
I do not think so much about the EJB plugin functionality. I will be on the
#freenode at the evening. Maybe we discuss general plugin functionality of the
current state and next steps to implement new draft.
Thanks;
--Gurkan
________________________________
From: James Carman <[email protected]>
To: [email protected]
Sent: Tuesday, June 16, 2009 12:49:19 AM
Subject: Re: EJB Classes Required in non-EJB environment...
On Mon, Jun 15, 2009 at 5:17 PM, Mark Struberg<[email protected]> wrote:
>
> Hi James!
>
> I really appreciate your comments!
> I thought about this when I wrote it and I think it is kind of a chicken-egg
> problem:
> How should the registration get started?
You would instantiate the plugins the same way you do now. You'd just
have an startup() method that takes some object that allows you to
register stuff on it (new contexts, dependency providers, etc.).