ejb

How to inject session bean into a POJO using Spring

I am having a EJB 3.0 Session Bean which implements the Local interface, and I have a pure POJO also. How can I inject a Session Bean into the POJO rather than manual JNDI look up in to POJO through spring(using @Resource and SpringBeanAutowiringInterceptor)?. Is there any way to do that? ...

started to learn EJB. What options do I have for an application server?

Hi, I have started learning EJB. I like to know which is best application server for beginner to learn EJB... ...

How can an EJB parallelize a long, CPU intensive process?

The application has a CPU intensive long process that currently runs on one server (an EJB method) serially when the client requests it. It’s theoretically possible (from a conceptual point of view) to split that process in N chunks and execute them in parallel, as long as the output of all parallel jobs can be collected and joined toge...

Web Services vs EJB vs RMI, advantages and disadvantages?

My web server would be overloaded quickly if all the work were done there. I'm going to stand up a second server behind it, to process data. What's the advantage of EJB over RMI, or vice versa? What about web services (SOAP, REST)? ...

Stateless Session Beans vs. Singleton Session Beans

The Java EE 6 Tutorial says: To improve performance, you might choose a stateless session bean if it has any of these traits: The bean’s state has no data for a specific client. In a single method invocation, the bean performs a generic task for all clients. For example, you might use a stateless session bean to send an ema...

EJB 3.1 @EJB Injection into POJO

Being a complete turbot this afternoon and cant seem to find the answer anywhere. With the new EJB 3.1 spec is it possible to inject an EJB into a pojo? I know in EJB 3.0 the @EJB annotation could be used to inject an EJB but this did not work on simple pojos. If it is not do I have to look the bean up in JNDI as I know you cannot sim...

Inject EJB into domain object with Java EE 6

How can I inject an EJB into a domain object (an JPA entity) with Java EE 6? ...

JBoss Bean Statistics in Web-Console

I would like to use the JBoss web-console to view bean statistics. I read in a book ("JBoss: A Developer's Notebook") that bean invocation statistics are visible when drilling down through web-console's tree. There's even a tantalizing screenshot of individual bean data showing "the total number of invocations processed is recorded, al...

Cross referencing an Entity from another ear

What I basically have is this (obfuscated example of my real domain code): In CarDaoEar: @Entity public class Car { //... } @Stateless public class CarDao implements CarDaoRemote { @PersistenceContext( unitName = "carPersistenceUnit" ) private EntityManger em; public void storeCar( Car car ) { em.persist( car ); } ...

Locking problems using SimpleReadWriteEJBLock

First of all, I am using Oracle and JBoss 4.0.4 and I'm pretty much a newbie on JBoss matters. Our distributed application uses CMP beans with SimpleReadWrite... etc locking policy, which I'm told seemed the best choice at the time. (Original developers are no longer working with us and I can't easily get feedback from them, not mention...

Maintaining state in the application server or in the database?

REST advocates web applications without client state on the server. The famous shopping cart example is translated to a resource which typically resides in a database. I wonder if it is a good practise to use a database for that kind of data, since the database is already the bottleneck in many applications. Wouldn't it be better to use...

hibernate3 maven plugin:make hbm2java generate hibernate annotations instead of ejb3 annotations

Is there a way of forcing the hbm2java goal of hibernate3 maven plugin to generate java classes with hibernate annotations instead of ejb3 annotations? I really do not need ejb/jpa, and hibernate annotations would suit me better because of the better integration with grails. ...

What is the need of a Custom Persistence Framework in Java?

We have a custom Persistence Framework wrapping the Entity Beans. I want to know why is this required or does it have any performance improvement when we already have Entity Beans (CMP) why the persistence framework is required. ...

Nested transaction support in J2EE 1.4

Hi, I read that EJB 2.x spec does not support nested transactions. But logically think we can call an EJB method that has REQUIRES_NEW txn attribute from another EJB method that acutally started a transaction Isn't this a valid case. If valid isn't this what is called nested transactions. Please point me if I am missing anything here....

Using a bean class from a servlet in a Java EE application

Hello all, I just started to study Java EE and made some examples (Just Hello World and some a bit more complicated). Now I'm doing a small application myself for learning purposes. I made an EAR, an EJB and an WAR just like in this example but, instead of working with interfaces, I'm working with real classes. In summary, EJB and WAR ...

How can I access the User Registry from an EJB in Websphere 6.1

I want to access user information from the websphere ldap user registry (e.g. phone no). How can I achieve this? It's about Websphere Application Server 6.1. Thanks a lot! ...

Is there any standalone EJB container that drops into non-j2ee web servers?

Hi Right now I am using a web-server which does not contain EJB container. If my application needs EJB container, how could I add one? ...

Logging of changed fields/columns in DB updates

Our product ecosystem: Web/Enterprise Application using EJB in Glassfish V3 and PostgreSQL 8.4. How to detect which field was changed without using dirty flags or re-reading the same record(s) before updating it ? Why: For audit purpose/logging Any recipes or ideas ? Thanks Sven ...

How to implement Administrator rights in Java Application?

I am developing a Data Modeling Software that is implemented in Java. This application converts the textual data (stored in a database) to graphical form so that users can interpret the data in a more efficient form. Now, this application will be accessed by 3 kinds of persons: 1. Managers (who can fill the database with data and they c...

Using Spring Security with EJB or Spring?

I wanted to build an application based on Java EE 6, but the security mechanisms of Java EE are not sufficient and a pain to with for my needs. Spring Security seems the best way to secure my application. Now I wonder if Spring Security + EJB is a good combination or if I should be better use Spring only. I need method interception, ACL...