ejb

Using Hibernate Ejb3Configuration with Container Management

穿精又带淫゛_ 提交于 2019-12-25 01:43:00
问题 Is there a way to use programmatic configuration provided by Ejb3Configuration with container managed entity management? I would like to dynamically add (additional) annotated classes that were discovered via ServiceLoader after the persistence.xml is processed. I attempted to extend HibernatePersistence override the createContainerEntityManagerFactory method where I added the functionality to add the classes but I found two problems: 1) When I attempt to call the EjbConfiguration instances

Concurrent usage of an EJB that is exposed as RMI service

a 夏天 提交于 2019-12-25 00:37:24
问题 I have built an application which simulates several clients using the same RMI service. This service is then invoked concurrently by every client retrieving and uploading data to the server. My concern is if every remove invocation takes some time does the remote service implementation (jBoss 5 EJB) can handle these calls remotely or it serializes them down. If the latter is the case then I have to limit the number of clients to prevent slowing them down. 回答1: RMI calls are not sequentialized

java.rmi.MarshalException: Failed to communicate

自古美人都是妖i 提交于 2019-12-24 21:49:09
问题 I'm using jbossIDE Eclipse 1.6. when deploying my .ear app, I get a java.rmi.MarshalException. what's surprising is that just a few min ago, everything was OK. I feel like this jbossIDE Eclipse thing is really useless. it's crashing all the time. java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is: java.io.InvalidClassException: com.afrikbrain.util.message.MessageInfo; local class incompatible: stream classdesc serialVersionUID =

Wildfly Form Auth fails when using special characters

最后都变了- 提交于 2019-12-24 16:26:29
问题 We are deploying our GWT app to a Wildly 8.1.0 server and are using form authentication for security. Our problem is that every time our customer has a special character (æøåäëö, etc.) in their username or password, they cannot login. I have seen other people having the same issue: https://developer.jboss.org/thread/42859?tstart=0 UTF-8 encoded j_security_check username incorrectly decoded as Latin-1 in Tomcat realm Spring security: Form login special characters but they are using Tomcat

Stateful session beans unexpected behaviour when packaged in a war and packaged in an ear->jar

怎甘沉沦 提交于 2019-12-24 15:18:45
问题 I am new to ejbs. I wrote a stateful session bean scoped @SessionScoped. Then I injected the ejb into my servlet. @Local @SessionScoped @Statueful public class CartServiceImpl implements CartService { private int i = 0; public int getI() { return i++; } } In my servlet @Inject private CartService cartService; . . . out.print(cartService.getI()); Then I opened two browsers (IE, FF) and have hit the servlet. In IE I see output starting from 0 to n. In firefox also I see the output starting from

arquillian-was-embedded-8 runs but can't inject EJB. NullPointerException

≯℡__Kan透↙ 提交于 2019-12-24 14:34:30
问题 I tried to inject my EJB bean in Arquillian integration tests with WebSphere embedded container. When injecting EJB I get the NullPointerException. But container is started correctly, because translogs are occured. I followed the exmaple at the https://github.com/arquillian/arquillian-container-was/blob/master/was-embedded-8/src/test/java/org/jboss/arquillian/container/was/embedded_8/WebSphereEmbeddedIntegrationClientTestCase.java My test code: package com.daoleen.websphere.arquillian.test;

weblogic.socket.UnrecoverableConnectException

醉酒当歌 提交于 2019-12-24 14:24:27
问题 I have an ejb deployed on weblogic. I am able to successfully get the remote reference via a simple java client. However when I hit the ejb via my web application it throws the below exception: javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason: HTTP/1.1 404 Not Found]] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40) at weblogic.jndi

How do I programmatically start/stop an EJB

老子叫甜甜 提交于 2019-12-24 14:13:00
问题 Does anyone know if it's possible to start/stop an EJB within my application code? Eg. I have some MDBs that I wish to selectively start/stop while my application is running? Any ideas? Can this maybe be done via JMX? Cheers! 回答1: The EJB spec has no mechanism to start/stop individual EJBs (or even modules) within an application. It is possible to start/stop applications dynamically using JMX via JSR 77. (I see you're using the jboss tag. I have no expertise in JBoss, so I don't know if it

finalize method in MessageDrivenBean

安稳与你 提交于 2019-12-24 14:12:32
问题 Message-Driven Bean Class the requirements of a message-driven bean class: It must not define the finalize method. What is the reason for above requirement ? 回答1: If you look in the EJB spec, you will see that it is a requirement for all types of EJB. http://download.oracle.com/otndocs/jcp/ejb-3.1-pfd-oth-JSpec/ I can't find a definitive answer but looking on various Java forums over the last 13 years, you can see answers consistently saying that, because the container will decide the life

@EJB inside utility class is null

浪尽此生 提交于 2019-12-24 14:02:23
问题 I have a form in my application for which I'm trying to validate that the userName and/or email is not already on the DB. This is service class: @Stateless public class CustomerFacade extends AbstractFacade<Customer> { @PersistenceContext(unitName = "OnlineStorePU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } public CustomerFacade() { super(Customer.class); } } This is the entity class: @Entity @Table(name = "customer") @XmlRootElement