7 Replies Latest reply on Oct 5, 2013 12:43 PM by Marius Gerwinn

    CDI: Prevent Classes from being remote subscribed (to Server)

    Marius Gerwinn Newbie



      we got some marshalling issues with CDI Events when running our app.

      We figured out that for some reason every client class that is used with  @Observe or @Inject Event<SomeClass>

      is subscribed to the server CDI-System. This also happens for some client only available classes (not annotated with @Portable and/or in a client only project).

      So the marshalling exception is fine.


      Anyhow we are actually not using CDI events for client<->server communication.

      But we make a lot of use of the CDI Events on client side.


      Is there a way to prevent the subscription of CDI Events to the server?

      At best this would work for individual classes. So some black/whitelisting with an annotion would be nice (like @Portable)


      Thanks for reading,