Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>@Tair</p> <p>I have an ejb component which consumes web service requests as below </p> <pre><code>@Name("plugin") @Stateless @WebService(name = "PluginService", serviceName = "PluginService") public class PluginService implements IPlugin { @WebMethod public boolean createUser(String username, String password) { System.out.println("in login "); WebAuthenticator authenticator = (WebAuthenticator) Component .getInstance("webauthenticator"); usreCreated = authenticator.create(username, password); System.out.println("valid user "+validUser); return userCreated; } } </code></pre> <p>WebAuthenticator is a seam component as follows</p> <pre><code>@Name("webauthenticator") @Scope(ScopeType.CONVERSATION) public class WebAuthenticator { @In EntityManager entityManager; @Observer("test") public void test() { System.out.println("A transaction success event was fired"); } private static Log log = (Log) Logging.getLog(WebAuthenticator.class); private static byte[] accountPassword = null; private static Account currentAccount = null; public boolean createUser(String username, String password) { System.out.println("In web authenticator"); User user = new User(); user.username = username; user.password = password; entityManager.persist(user); entityManager.flush(); Events.instance().raisTransactionSuccessEvent("test"); } } </code></pre> <p>in components.xml file, i have <code>&lt;transaction:ejb-transaction /&gt;</code> , so that seam can get updates about container transaction events and I have seam managed persistence context</p> <pre><code> &lt;persistence:managed-persistence-context auto-create="true" name="entityManager" persistence-unit-jndi- name="java:/pilotEntityManagerFactory" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload