ejb-3.0

Is it legal to inject a @Stateful into an MDB?

大憨熊 提交于 2019-12-23 12:19:50
问题 Is it legal to inject a @Stateful into an MDB? @Stateful public class InteruptBean implements Interrupt { .... } @MessageDriven(...) public class EchoTrigger implements MessageListener { @EJB Interrupt interrupt; .... } Or better phrased: Can I use a stateful EJB to pass state around in an asynchronous Event Driven Architecture? 回答1: Yes, it's "legal", but it's nonsensical. MDBs instances are pooled like SLSBs. The MDB will become non-functional after the SFSB times out. It might work to

Same stateless bean in two ears

无人久伴 提交于 2019-12-23 06:07:33
问题 I have the same EJB module with a bean inside an EAR that is server side and an EAR that is the client side. Can I have this situation? Because I'm getting this error http://justpaste.it/gfs3 without understand how to fix it. 回答1: You have answer in the stack trace: The short-form default binding 'com.demo.view.RitornaPersonaRemote' is ambiguous because multiple beans implement the interface : [RitornaPersonaSenzaClientEAR#RitornaPersonaSenzaClient.jar#RitornaPersona,

Transaction Exception with Spring 4.0.6 + Weblogic 10.3.6 + EJB 3.0 CMT + Spring Data JPA 1.6.2 - “Error binding to externally managed transaction”

China☆狼群 提交于 2019-12-23 04:39:48
问题 I am having a weird, and hard to debug, issue using Weblogic 10.3.6, Spring 4.0.6, Spring Data JPA 1.6.2, Eclipselink (reproduced both the Weblogic embedded 2.3 version and the newest 2.5.2) and Container Managed Transactions. (I updated Weblogic to use JPA 2.0 installing the patch provided by Oracle). The issue is the following: I have a simple, stateless, EJB 3.0 in which I do use Spring Autowiring and spring-data-jpa repositories. When I do call any service exposed by the EJB, I get the

java.lang.ClassCastException: $Proxy99 cannot be cast

て烟熏妆下的殇ゞ 提交于 2019-12-23 03:12:58
问题 I am using JBoss4.2.2 and java6. The deployed ear's name is apa.ear In a servlet I have the following code line: placeBid = (PlaceBid) context.lookup("apa/" + PlaceBid.class.getSimpleName() + "/remote"); I have a generated jboss-app.xml like this: <jboss-app> <loader-repository>apa:app=ejb3</loader-repository> </jboss-app> When trying to get the PlaceBid via the context I get this exception java.lang.ClassCastException: $Proxy99 cannot be cast to se.nextit.actionbazaar.buslogic.PlaceBid The

how can I invoke a webservice from another webservice

醉酒当歌 提交于 2019-12-23 01:31:34
问题 I have two webservices A and B. A needs to invoke one of the webMethods in B. How can I achieve this? I am using maven's wsimport plugin to build A. This is to generate the necessary stubs for B and include them as part of the Webservice A. However, when I try to Invoke the webmethod o f B, I get an Exception. Can anyone please tell me what is going on? Below Is the code and the exception trace: Code: BBeanService bbs = new BBeanService(); BBean bb = bbs.getBBeanPort(); bb.invokeWebService();

Glassfish 3.0: Exception while deploying ejb module…Invalid ejb j ar: it contains zero ejb

风流意气都作罢 提交于 2019-12-23 01:16:12
问题 I have a very simple ejb 3.0 module with maven, it has only two session beans one stateless and the other is singleton...when I am trying to deploy the project on Glassfish 3.0 server, I got this exception: Error occurred during deployment: Exception while deploying the app : Invalid ejb jar : it contains zero ejb. Note: 1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean. 2. EJB3+ entity beans (@Entity) are POJOs and please package them as library

weblogic ejb ComplianceException

不打扰是莪最后的温柔 提交于 2019-12-22 17:59:32
问题 I try to deploy an application which uses EJB on weblogic 10.3. I use the framework seam 2.2.0 I created an EJB project and en EAR project with workshop. When I compile the project, I get this error: weblogic.ejb.container.compliance.ComplianceException: No business interface, component interface or web service endpoint interface found for Session Bean Authenticator Here is the bean code: import javax.ejb.Local; import javax.ejb.Stateless; import javax.persistence.EntityManager; import org

What is the best prctice for using security in JAX-WS

主宰稳场 提交于 2019-12-22 10:48:58
问题 Here is scenario : I have some web services (JAX-WS) that need to be secured. Currently for authentication needs I providing addition SecurityWService that give authorized user some userid & sessionid that is need to be described in request to other services. It would be more better to use some java security. We have many of them but could not defined what is better to use. Q1 : It is understand that I should use SSL in transport layer, but what should I use for user authorization. Is there

Weblogic wrap application exception in javax.ejb.EJBException

爷,独闯天下 提交于 2019-12-22 10:45:38
问题 My ear application was working fine. But suddenly it started to throw javax.ejb.EJBException in some method calls, instead of returning the original Application Exception (annotated with @ApplicationException(rollback=true). Now the original application exception is wrapped in the EJBException. the Currently the other developer who was working in the project is on leave. Therefore I have no idea what he has done to the code for happening this. This application exception and ejb remote

Cant access EJB from a Java SE client - Lookup Failed Error

孤街醉人 提交于 2019-12-22 10:33:51
问题 I am using Netbeans and am experimenting with EJBs. I have two projects (2 separate applications) 1- A Java ME Project called EnterpriseApp 2- A standard Java SE Project called Test Now here is what I did - in EnterpriseApp I generated a stateless EJB called TestEJB with both local and remote interfaces. For the remote project selection I selected the Test App. In short the bean code looks like this @Stateless public class TestEjb implements TestEjbRemote, TestEjbLocal { @Override public