ejb

Does it make sense to use QueuedPessimisticEJBLock and optimistic-locking simultaneously?

I'm working on a J2EE application where the EntityBeans (EJB 2.1) are using the container configuration "Standard CMP 2.x EntityBean" which uses the locking-policy QueuedPessimisticEJBLock: <container-configuration> <container-name>Standard CMP 2.x EntityBean</container-name> ... <locking-policy>org.jboss.ejb.plu...

OpenEJB : Configuring MDBs with custom ConnectionFactory

As described in OpenEJB docs, we can configure JMS connection factory and queues, and they will appear in JNDI as: openejb:Resource/MyJmsConnectionFactory, openejb:Resource/MyQueue Given those JNDI entries, how can I tell to MDB to use them? Is it possible to change JNDI name, for example ConnectionFactory to appear as java:/Conne...

javax.ejb package not found (Eclipse)

I have installed Eclipse for Java EE and the Java EE SDK from Sun, and am attempting to create (my first) Java EE application. I've created an EJB project, then added a session bean using Eclipse's own wizards, and the package javax.ejb isn't found! I've configured the Java EE SDK as the target runtime environment, and a JDK 1.6 as the...

Is it safe to access EJB home object from multiple threads?

Hello guys, I have read this thread: J2EE/EJB + service locator: is it safe to cache EJB Home lookup result ? I use the same approach, i.e. I obtain EJB home object for my entity bean and cache it in a servlet. My question is: is it safe to share this object between multiple threads? From EJB 2.1 spec I found only that concurrent call...

Eclipse EAR project problem

Hello, I've created an Enterprise Application Project in Eclipse. Then i created an EJB project, and i checked "Add project to an EAR", and i selected the EAR project. In the EJB Project i checked a checkbox so that i create the EJBClient and EJBEAR projects too (see the image) If i create an interface in the EJBClient project, the c...

Netbeans, Glassfish deployment problem

I am developing a web project using Netbeans 6.9.1 and Glassfish 3.0.1. Everything was fine until I refector a sesion bean by renaming it from “outboxSession” to “OutboxSession”. Now the project cannot be deployed. I have tried many thinks like restarting Glassfish, restarting Netbeans, restarting my PC itself, deleting the built folde...

EJB3 interceptors

I have been looking into how interceptors can be applied to session beans etc in EJB3.0. Can these be applied to servlets as well? ...

Command Button Render ?

Hello All! I have one command button for task add to cart, it means when items quantity instock is geater than 0 command button will display but if items quantity instock is 0 it doesn't display. How can i write one method render with command button for my upon requirement? Edited =======================================================...

Default EJB transaction mode for asynchronous methods?

When I have an @Asynchronous method in an EJB, and I don't specify the @TransactionAttribute, then how exactly does the container handle the transaction boundaries? Obviously, it can't use the calling thread's transaction, so what does it do? Same question, but regarding methods that are triggered by the TimerService. EDIT: I think...

Where I can find a complete reference of openejb.xml?

Do anyone know where I can find a complete reference of openejb.xml configuration file from OpenEJB? ...

NameNotFoundException when application name contains a period

I have a simple EJB app that used to work about 6 months ago. I installed the latest JDeveloper (11.1.1.3.0) and I'm trying to get it to work again, when I ran into this problem. Deployment fails on this line: TeacherManager teacherManager = (TeacherManager)context.lookup("Uran_2.0-TeacherManager#hu.elte.pgy2.BACNAAI.UranEJB.TeacherMan...

Stateless EJB JPA Error

My project is based on Netbeans 6.9 ,JEE 6 Web Application with Stateless EJB, REST Services. There is a big problem while doing the transaction. 1) Using JPA: JPA is not pushing the values to the db table after persist/flush. But entity ID is populated. I'm not able to the same db - entity in the other application. Ideally it should pu...

What to put into jta-data-source of persistence.xml?

What value should I place into <jta-data-source> of my persistence.xml? In glassfish admin panel I created a datasource name "abcDS". In my jndi.properties (inside src/test/resources) I defined it like this: [...] abcDS=new://Resource?type=DataSource abcDS.JdbcDriver=org.hsqldb.jdbcDriver abcDS.JdbcUrl=jdbc:hsqldb:mem:testdb abcDS.JtaM...

A fresh graduate confused by the Java EE jargon Spring, Struts, JSF, EJB, Jboss, JMS,

As we all know that we rarely get a chance to learn whats out there in the enterprise world when it comes to college. In my experience I have always seen people learning Core Java and may be some other languages and when they graduate they have no Idea about this enterprise jargon. I am in that boat now. I am a recent graduate with a pr...

What Jersey doesn't like in my Stateless Session Bean?

This is my SLSB: @Stateless(name = "FinderEJB") @Path("/") public class Finder implements FinderLocal { @Path("/simple") @GET public String simple() { return "works"; } } The interface is: @Local public interface FinderLocal { public String simple(); } This is what I'm getting in Glassfish server log when I'm trying t...