1

I created a custom scope in CDI.

@NormalScope(passivating = false)
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE,ElementType.METHOD,ElementType.FIELD})
@Inherited
public @interface MyScope { }

It works only if I had beans.xml with in my deployment. Is this a must?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

1 Answers1

1

I have packed custom scope as separate jar and placed beans.xml inside. Now its working fine.