Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4707

Preventing reconnect attempt of remote ejb client

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.1.1.Final
    • EJB

    Description

      Hi,

      I have a remote ejb client and a custom login module. I am testing my login module, i enter an invalid password in remote client. My login module runs correctly and send an exception. However, remote client attempts to recall login module again to login user. But i do not want this. Because when there is an exception in my custom login module, i update some values in my database. Therefore the same code in login module runs twice and my db has inconsistent values. So how can i prevent this reconnect attemp of remote ejb client? I use JBOSS 7.1.2 Final SNAPSHOT version in server and jboss 7.1.1 client maven dependencies. Thanks.

      My Client code is like below:

      Properties pr = new Properties();
      pr.put("endpoint.name", "client-endpoint");
      pr.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
      pr.put("remote.connections", "default");
      pr.put("remote.connection.default.port", "4447");
      pr.put("remote.connection.default.host", "localhost");
      pr.put("remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER");
      pr.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
      pr.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
      pr.put("remote.connection.default.username", "user1");
      pr.put("remote.connection.default.password", "Test12345");

      EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(pr);
      ContextSelector < EJBClientContext > selector = new ConfigBasedEJBClientContextSelector(cc);
      EJBClientContext.setSelector(selector);

      Properties props = new Properties();
      props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
      props.put("jboss.naming.client.ejb.context", true);

      try

      { Context c = new InitialContext(props); kullaniciEJB = (KullaniciEJBRemote) c.lookup("ejb:merveys-kayit-tckkys/merveys-kayit-ejb-tckkys//KullaniciEJB!tr.gov.tubitak.bilgem.uekae.deys.tckk.merveys.common.controller.ejb.kullanici.KullaniciEJBRemote"); }

      catch (NamingException e) {
      e.printStackTrace();
      }
      int count = kullaniciEJB.countKartIslemList(1L, null, null);

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            serkanyildirim Serkan Yıldırım (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: