2 Replies Latest reply on Nov 26, 2015 10:25 AM by shadogray

    Difference of handling @Stateless in Wildfly-10.0.0.CR4 to 9.0.2 ?

    shadogray

      Hi,

       

      I have implemented a SFSB bean which was provided by a SLSB BeanProvider.

      This Provider is used in another _SFSB_ to provide a remote invocation context to the client.

       

      In my case: SecureFileSystem provides a remote SFSB SecureRemoteFile

      Code at: https://github.com/shadogray/securefs/blob/master/securefs-master/securefs-common/src/main/java/at/tfr/securefs/SecureFileSystemBean.java

       

      This works fine in Wildfly-9.0.2.Final, but fails in Wildfly-10.0.0.CR4.

      First SecureFile access works fine, but on second file access, it seems, that BeanProvider doesnt produce a _new_ SFSB SecureFile, but still the first and closed SecureFile is used.

       

      The way to correct the problem seemed to be, to change the BeanProvider from SLSB to RequestScoped, I assume that the SFSB scope of the SecureFileSystem is propagated to BeanProvider, and so no new SecureFile bean is produced.

       

      Can you clarify the problem, and what the difference between 9.0.2 and 10.0.0.CR4 is in this respect?

       

      {code}

      @Stateless

      public class BeanProvider {

       

          @EJB(beanName = "SecureFileBean")

          private SecureFileBean secureFileBean;

       

          @Produces

          public SecureFileBean getFileBean() {

              return secureFileBean;

          }

      {code}

       

      Thanks,

      Thomas