Skip to content

Provide a method to register an instance #6

@heruan

Description

@heruan

A method to register an instance of a bean for a particular scope would be very useful. For example:

String scope = "foo";
ScopeContext<String> context = (ScopeContext<String>) beanManager.getContext(MyScope.class);
context.enter(scope);

context.register(scope, MyBean.class, new MyBeanImpl(scope));
// or
context.getScope(scope).register(MyBean.class, new MyBeanImpl(scope));

This way when entering a certain scope one can register instances of particular beans, e.g. when the bean implementation requires arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions