ejb-3.1

EJB3.1 Timer cancel issue

三世轮回 提交于 2020-01-06 03:58:25
问题 I have a problem with EJB3.1 Timer service. I find this issue quite strange! I have a stateless session bean like below deployed on JBoss7.1.1 application server. import javax.annotation.Resource; import javax.ejb.Local; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.Timeout; import javax.ejb.Timer; import javax.ejb.TimerService; import javax.interceptor.Interceptors; @Stateless @Local(HelloUserLocal.class) @Remote(HelloUserRemote.class) public class HelloUserBean

how to run two methods annotated with @Schedule one after another in ejb

拜拜、爱过 提交于 2020-01-06 03:53:07
问题 i have to run two methods one after another for every 10 minutes using @schedule annotation in ejb. my code is like: @Schedule(minute="*/10") public void mth1() { System.out.println("welcome"); } @Schedule(minute="*/10") public void mth2() { System.out.println("hello"); } how to proceed? Thanks for ur reply..but,the timer is set for 10 minutes for both mthds separately.2nd mthd starts to execute after 1st mth completes,. if i call 2nd mthd in 1st mthd both are run within 10 min ..i want to

Scheduled task executed twice

三世轮回 提交于 2020-01-05 22:22:13
问题 I have a Stateless session bean with two @Schedules : @ConcurrencyManagement(ConcurrencyManagementType.CONTAINER) @Stateless @Lock(LockType.WRITE) @AccessTimeout(value = 0) public class ScheduledTask { @EJB private SomeClass sClass; @Schedules({ @Schedule(hour = "*", minute = "*/10", info = "Automatic timer to send")}) public void send() { sClass.doWork(true); } @Schedules({ @Schedule(hour = "*", minute = "*/35", info = "Automatic timer to receive")}) public void receive() { sClass.doWork

How WebSphere manages startup order of EJB jars?

走远了吗. 提交于 2020-01-04 16:56:11
问题 When an ear would contain two ejb modules modulea.jar and moduleb.jar. And modulea.jar contains an @Startup ejbX, that calls another ejbY, which is not an @Startup ejb, from moduleb.jar during the startup of the bean X it is required that moduleb.jar is started first as otherwise the app server is not able to inject X into Y. But how to ensure that moduleb.jar is started first? Currently I have this problem in WebSphere, but I can't seem to find a way to enforce an order. Is there something

Are there any EJB migration tools available for migrating EJB 2.1 toEJB 3.x

我怕爱的太早我们不能终老 提交于 2020-01-03 13:36:41
问题 May be the best way is doing it manually. But in a large project you need some tool to assist you. It was the idea that led me to search a tool. Are there any EJB migration tools available for migrating EJB 2.0 to 3.x. 回答1: It was only under development for a short time, but for a period we did have an eclipse plugin that would read in ejb-jar.xml files and then update the source and insert the annotations. It's been used a handful of times by the person who wrote it (Jonathan Gallimore) and

GlassFish clustering + EJB lookup

六月ゝ 毕业季﹏ 提交于 2020-01-03 05:25:17
问题 We have Glassfish cluster which has two instances. On this cluster one my EJB application is deployed and running. Now I have another EJB-Timer-application which I want to deploy on Glassfish server(domain) not on cluster then I want to access the cluster's EJB. AS per my understanding EJB timer could not deployed on a cluster because it could be run on both the instances of cluster. What are the possible ways to access it ? Thanks 回答1: You can actually deploy EJB timers on a cluster. They

Injecting EJB within JAX-RS resource on JBoss7

天涯浪子 提交于 2020-01-02 07:46:06
问题 I'm wondering why ejb injection into JAX-RS resource (RestEasy on JBoss7) is not working. EJBs are not part of war but its own EJB jar but I supposed this should not be the problem. I'm forced to do the ctx.lookups "workaround", which are not pretty. Am I missing something or it is really not supported to inject EJB like that? Example below does not work with JBoss, but works with Glassfish (sadly I gotta run my application on JBoss) Path("x") @RequestScoped public class UserResource {

javax.persistence.PersistenceException: Invalid persistence.xml

╄→尐↘猪︶ㄣ 提交于 2019-12-30 11:04:42
问题 I'm working on project with Servlet,JPA,EJB and JBoss in eclipse. As you can see in the title of my topic I have an error on my persistence.xml file but I don't know which: <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="TrainingAppEJB-PU"> <provider>org.hibernate.ejb

javax.persistence.PersistenceException: Invalid persistence.xml

白昼怎懂夜的黑 提交于 2019-12-30 11:03:58
问题 I'm working on project with Servlet,JPA,EJB and JBoss in eclipse. As you can see in the title of my topic I have an error on my persistence.xml file but I don't know which: <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="TrainingAppEJB-PU"> <provider>org.hibernate.ejb

Jboss AS 7.1.1 ejb 3 : EJB pool error

≡放荡痞女 提交于 2019-12-29 09:09:06
问题 We have an application running on Jboss AS 7.1.1 and uses EJB 3. We are intermittently seeing the following errors javax.ejb.EJBException: JBAS014516: Failed to acquire a permit within 5 MINUTES at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:109) at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.remote