ejb

Why stateless session beans are single threaded ?

As per my understanding stateless session beans are used to code the business logic. They can not store data in their instance variables because their instance is shared by multiple requests. So they seem to be more like Singleton classes. However the difference is contain creates (or reuses from pool) the separate instance of stateless ...

Integration of JavaScript and JMS

Where can I find a guide for integrating JavaScript and JMS (Java Messaging Service)? I would like a best practice or established technology that allows me to directly or indirectly receive messages from a topic and update a site based on the message. I was thinking of creating two components, a servlet for the Web module, and an MDB (M...

Any good open-source load / stress tools to test EJBs?

There are a number of commercial offerings that I've come across but nothing open-source. I realise that you could do something simiilar with JUnit / JMeter but I'm looking for something a bit more specific. ...

Best solution for using EJBs from Excel

We would like to give access to some of our EJBs from Excel. The goal is to give an API usable from VBA. Our EJBs are mostly Stateless Session Beans that do simple CRUD operations with POJOs. Some possible solutions: Exposing the EJBs as WebServices and create a VB/C# dll wrapping them, Using Corba to access the EJBs from C#, Creati...

ADF Business Components thru RMI Vs EJB and Toplink

I was wondering what the differences would be in implementing remote business logic. Currently we are planning on using ADF to develop front-end web apps (moving from Struts). We were wondering what the differences between the front end calling EJBs using Toplink vs ADF Business Components thru RMI in terms of scalability as the migratio...

What are the advantages and disadvantages of DTOs from a website performance perspective?

What are the advantages and disadvantages of DTOs from a website performance perspective? (I'm talking in the case where the database is accessed on a different app server to the web server - and the web server could access the database directly.) ...

Intefacing EJB - XML using JAXB interface.

I was trying to add the xml schema to an existing EJB project. JAXB is used to bind the XML-Schema to java class. As we are going to use the search engine to crawl thru DTO when EJB is in session. I could not find any direct approach as to map entity class file to XML-Schema. The only way we could achieve so far is to create the Web...

Are EJB still alive ?

Do you still use session or entity EJB in your project ? Why ? ...

Why pool Stateless session beans?

Stateless beans in Java do not keep their state between two calls from the client. So in a nutshell we might consider them as objects with business methods. Each method takes parameters and return results. When the method is invoked some local variables are being created in execution stack. When the method returns the locals are removed ...

Enterprise App and the Enterprise App Client

I came aboard a new project with a new company and we are trying to use JPA to do some DB work. So we have an Ear with an EJB, a webservice, and then there is a app client in the ear that really does all the work. The Webservice, calls the EJB, and the EJB calls the client to do the DB work. So within the appclient I want to load an E...

Stateless EJB question.

We have a stateless EJB that is behind a webservices (EJB3), this EJB also loads a EntityManager that is passed in calls that it makes. With that I have a question. Do simultaneous call to the webservice use the same EJB or is there different instances? I ask this especially concerning the use of the EntityManager, which is injected. ...

OC4J 10.1.3.4 problem with deploying multiple 2.1 EJBs

I am having troubles migrating from OC4J 10.1.2.3 to 10.1.3.1.4. The problem is for applications that have multiple EJBs (all are 2.1, no EJB 3.0). Jdeveloper will take the default ejb-jar.xml (the one required for Jdeveloper to run it on its stand-alone OC4J instance) and package it into each EJB JAR module NO MATTER what. This results...

How do you establish context and call an WebSphere EJB from the Sun JRE (not IBM)

Is there a way to call an EJB that is served through WebSphere (iiop://host:port/ejbName) from a vanilla JRE (like Sun). A lot of people have been telling me that this type of architecture relies in a homogenous environment. Thoughts? ...

J2EE and Grails: Communication with WebServices? Which framework?

Hy, I'm developing a Grails app which has to communicate with an existing J2EE application (built with EJB2). Both the "legacy" app and the new Grails app will offer services and consume them. For intercompatibility reasons, I'm thinking of communicating using WebServices. Now I'm wondering which frameworks I should use on both sides. ...

How do I set up a mock queue using mockrunner to test an xml filter?

I'm using the mockrunner package from http://mockrunner.sourceforge.net/ to set up a mock queue for JUnit testing an XML filter which operates like this: sets recognized properties for an ftp server to put and get xml input and a jms queue server that keeps track of jobs. Remotely there waits a server that actually parses the xml once ...

What is a good design for a query "layer" for Java JPA

In JPA the Entities are nice annotated Plain Old Java Objects. But I have not found a good way to interact with them and the database. In my current app, my basic design is always to have a sequence based id as primary key so I usually have to look up entities by other properties than PK. And for each Entity I have a stateless EJB of ...

Where (which layer) to put Entity query methods, "persist" methods etc. ?

Hi, I have a SEAM app with some JPA/Hibernate entities. And I now wonder where to put my query, persistence methods. The default choice seems to put them in a session bean layer with injected @PersistenceContext(...) @Inject EntityManager entityManager; But I think I would rather have the methods on the entities themselves. What ar...

What is your method to generate Websphere 6 EJB with Ant / JDK 1.4.x ?

The only working method I found, several years ago, was : Generating ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi for each session bean by using XDoclet (ejbdoclet task) Making a jar (without stubs) with task jar; ; Calling the binary EJBDEPLOY with this jar without stub in parameters. But I feel there must be a cleaner method. Whi...

Business Interface pattern with EJB with Remote as well as local interfaces

How can I use Business Interface pattern with an EJB (session bean) with Local as well remote interfaces? ...

Is there a perferred method to update apps that use an EJB?

I have a java app that works with an EJB, however if: The EJB gets updated, the app is broken. The app server is updated, the app is broken. Without human involvement, is there a preferred method to update the client jars for the app server and bean? If there preferred method depends on the app server, then assume jboss. ...