ejb-3.1

Remove EJB timer tasks from WebSphere Console

谁说胖子不能爱 提交于 2019-12-11 08:19:26
问题 I have an EJB application and used EJB Timer to place some tasks(persisted database sequence ID) with expire date/time on it and once time expires remove the tasks from the Timer and invoke some method. I am in situation that there are bunch of the tasks placed in EJB Timer and whenever Timer Timeouts and it gets each of the tasks from Timer and try to invoke some method that has to update some database associated with task id. I found some how those all tasks are deleted from database during

Can EJB 3.1 Lite be exposed via Remote interface?

十年热恋 提交于 2019-12-11 07:55:45
问题 So I have written an application Expose my business logic via Remote interface for App Client, and Local interface for Web module. Just find out that our server has limited memory, so I need to make Glassfish to be light weight. Unfortunately, GF Full Profile is not light weight (using GF 3.1.1 RC atm), therefore I am looking at the Web profile of GlassFish. Now there is a answer saying that Remote interface is not a feature of EJB Lite here ( exposes a Remote client view. This feature is not

JBoss7: Custom Login Module not working

给你一囗甜甜゛ 提交于 2019-12-11 07:51:04
问题 I am in the process of migrating from JBoss 5.0.1 to JBoss 7.2. I am calling EJBs with a remote EJB client. I have to migrate a custom login module that derives from AbstractServerLoginModule . I managed to configure JBoss so that the custom login module is actually called. In the custom login module I implement a javax.security.auth.callback.NameCallback and a javax.security.auth.callback.ObjectCallback like that: NameCallback ncb = new NameCallback("Username:"); PasswordCallback pcb = new

Second Call to remote EJB3 bean from jsf in different application - Delegate not set

≯℡__Kan透↙ 提交于 2019-12-11 07:19:50
问题 I'm getting a strange exception the SECOND time my remote ejb is called from my JSF Managed Bean. The first time the bean is called, the results are returned to the screen. However if I then click an action that calls the ejb for a second time, then I get the following Exception: SystemErr R java.rmi.RemoteException: CORBA BAD_OPERATION 0x0 No; nested exception is: org.omg.CORBA.BAD_OPERATION: The delegate has not been set! vmcid: 0x0 minor code: 0 completed: No [10/06/13 09:35:26:341 BST]

Explicit delete on JPA relationships

喜你入骨 提交于 2019-12-11 03:14:44
问题 I am a bit confused about managing relationship in JPA. basically I have two entities with a One to Many relationship A configuration can have have a one or many email list associated with it. @Entity public class Config { @OneToMany(mappedBy="owner",cascade=CascadeType.ALL, fetch=FetchType.EAGER) private List<Email> emailReceivers; } @Entity public class Email { @ManyToOne private Config owner; } In an EJB and during update/merge operation wherein I would edit the list of emails associated

How to access EJB from a Quartz Job

我只是一个虾纸丫 提交于 2019-12-11 02:48:35
问题 Well, I'm using Quartz to schedule some jobs that I need in my application. But, I need some way to access a Stateful SessionBean on my Job. I knew that I can't inject it with @EJB. Can anyone help me? Thanks. 回答1: I used the EJB3InvokerJob to invoke the methods of my EJB. Then I created my jobs that extends the EJB3InvokerJob, put the parameters of what EJB and method it should call and then call the super.execute(). The EJB3InvokerJob can be found here: http://jira.opensymphony.com/secure

How inject EJB into abstract CDI class?

拥有回忆 提交于 2019-12-11 00:26:26
问题 I have a problem with injecting an EJB into an abstract class which is the parent of my JSF CDI beans. In my project I am using MyFaces CODI 1.0.5 (ViewScope), Omnifaces 1.3, PrimeFaces 3.4.2 and GlassFish 3.1.2. The application is an EAR, the abstract class is in an EJB module and the JSF CDI beans are in a WAR module: webframework-demo.ear |__ webframework-war.war -> concrete JSF CDI bean |__ webframework-ejb-lib.jar -> abstract class with EJB injection |__ lib\ |__ shared libs My abstract

Getting started with embeddable JBoss EAP 6 / AS 7

对着背影说爱祢 提交于 2019-12-10 20:55:19
问题 I'm trying out embeddable JBoss with the EJBContainer.createEJBContainer API described in the spec (JSR 318: Enterprise JavaBeans, Version 3.1, ch. 22: Embeddable Usage), not any of the various predecessors using JBoss specific APIs. Overview When i invoke my main method normally, a session bean invocation succeeds. But there seem to be some classloading issues, because the JNDI object at "java:jboss/UserTransaction" cannot be cast to javax.transaction.UserTransaction. So i guess the

Using @RunAs in my EJB Schedulers

自作多情 提交于 2019-12-10 19:56:03
问题 I have many EJBs with my business methods. These methods use @RolesAllowed annotation to check if user can execute this method. So I have an EJB Scheduler that calls these EJB methods. EJB schedulers runs with anonymous user, so authorization fails. How I can run my schedulers with other role? For testing proposes, I run with @RunAs("SYSTEM") annotation, but I don't know if this is right. My scheduler class @RunAs("SYSTEM") public class InboxScheduler { protected void inboxFileScan(Timer t) {

Null EntityManager/EJB Injected into MDB

杀马特。学长 韩版系。学妹 提交于 2019-12-10 18:33:32
问题 I have a message-driven bean (MDB) deployed to WebLogic 12.1.3. I tried to inject an entity manager into the MDB using the @PersistenceContext annotation, but the entity manager is null. I also tried injecting a simple stateless session bean and it too is null. However, the MessageDrivenContext is injected correctly. What am I missing? From what I can tell searching SO and Google, you should be able to inject EJBs and entity managers into MDBs. I am able to inject them into other parts of the