ejb

How do I find out what SerialContextProvider I should use when performing a jndi lookup?

Today I was presented with this exception Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext [Root exception is java.lang.NullPointerException] at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:276) at com.sun.enterprise.naming.impl.SerialConte...

Maven ejb client source - is there a consistent/easy way?

Hey all, I'm using the maven-ejb-plugin to generate an ejb-client version of an ejb project. I have a separate entity/domain project where I make a -sources version for use with GWT. I'm currently running into issues as to where to put persistence.xml for various unit test frameworks (some want it in the entity/domain, others ejb, some...

EJB call from swing

I have app on GF V3.01 server and remote methods in EJB container. When I call remote methods from my remote swing app process take long time to execute. I read about ServiceLocator , but can no find examples for remote Swing app. Someone please help! give some idea to speedup remote method calls. I create this test and make some comm...

How to access to the 'Session' of an EJB?

Dear members, How to get the session object of an EJB session-bean like session object in JSP(web layer)? Because I want to add an attribute to the session and use it later in its process. Regards ...

javax.ejb.ScheduleExpression missing documentation

From the rather sparse javadocs: See EJB specification for the full timer expression syntax. There's no link, and no further clue where to find this "full syntax". Does anybody know what they're talking about? ...

Problem with member of in EJB with enum List

Hi, I'd like to make a query with WHERE MEMBER OF. This is my query SELECT DISTINCT pav FROM EPCI AS epci, IN (epci.listTown) AS town, IN (town.listPAV) pav WHERE epci.id = ?1 AND pav.flag = :flag AND pav.oneLocalisation.status MEMBER OF :status ORDER BY pav.name Status is an ENUM and :status a list of enum List<Status> listTmp = n...

best practice for handling connection errors

What is the best workflow taken when connection error occurs. Let say we have a client that connects to the middle tier. class MyClient{ ... void callServer(){ try{ middletier.saveRecord(123); }catch(...){ // log the error // what to do next (notify the user, take the same step again)? ...

Using OpenSessionInViewInterceptor to avoid LazyInitializationException

First I need to acknowledge the fact that I'm new to EJB, JPA and Spring, so many of the things I believe as true could be wrong. I'm building an EJB application where there's an stateless session bean used to retrieve many JPA (Hibernate) entities. The problem, which I believe is a widespread problem, is that I cannot traverse the rela...

How JEE6 makes the link between Observer and Observee (Observer Pattern)

Hello, I've read some blog articles about Observer pattern implementation on JEE6 and something bother me... I can't find any information atm so i ask there... I've found the following exemples: @Stateless [...] public class ParisJugService { @Inject Event event; public void helloParis(){ System.out.println("Hello P...

Problem with WebServices using EJB. The error is: "..does not contain operation meta data.."

Hi, I got an error as I mentioned above. My application has EJB WebServices, developing with MyEclipse and running on jboss4.2.2.GA. I use Eclipse's Web Services Explorer to invoke a WSDL operation. When I enter the parameters for the wsdl and click Go to invoke, I am getting this error in the SOAP Response Envelope; <faultstring>Endp...

How can i deploy Session Bean on another computer with Client JSP/Servlet

Hello Everybody i'm new in EJB3, i know how to deploy Session Bean (Stateless or stateful) on Glassfish server in one computer. My question is: how can i deploy session bean on Computer A and Deploy Servlet or JSP on Computer B? It mean Computer A have Session Bean Source and Computer B have Servlet or JSP source. if use 1 computer i ca...

Why shouldn't I use a JSF SessionScoped bean for logic?

Hi I'm developing a java EE web app using JSF with a shopping cart style process, so I want to collect user input over a number of pages and then do something with it. I was thinking to use an EJB 3 stateful session bean for this, but my research leads me to believe that a SFSB is not tied to a client's http session, so I would have to...

Spring session scoped bean in EJB 2 Stateless Session Bean

I'm adding some features to an old EJB 2 application using Spring. The Spring application context used by the EJBs is a parent context of the web application as described here. I'm trying to use a session scoped bean from within the EJBs. The bean in question is initialized from the EJB application context. However, I get this error ...

Access to remote EJB running in another Glassfish(EJB-Container) from another Glassfish(Web-Container)

Dear all, I want to use two separate servers, one for web-container and one for ejb-container. The both of these two containers are Glassfish V3. But, How to use @EJB annotation in my web project to access to remote ejb-container's ejb(s). In Ejb 2.0 we have to use ejb-descriptors but what happened in Ejb3.0 and glassfish v3? thanks ...

OSGI runtime inside traditional J2EE server

I understand it should probably be other way round (OSGI runtime hosting J2EE servers), as it is apparently already possible with glassfish. However, our clients have extensive experience in administering traditional J2EE servers and significant investment (licenses, training etc.) Our architecture would benefit from OSGI modular archit...

Thin(ner) standalone client for Enterprise Application

First a little background: I'm working on an enterprise application (ear) with an EJB module & an Application Client module. I also use hibernate JPA for persistence, and swingx for GUI. Those are the only third parties atm. This application is deployed on Glassfish. Everything was going well until I deployed my application for the fir...

Using JMX to read ejb manifest jar and ejb-jar.xml in ejb jar inside ear

Hello, I have an ear deployed on weblogic console. I need to check contents of manifest file and ejb-jar.xml of a jar that is present in the deployed ear. Currently I am using the code below to access jar inside ear deployed : Hashtable env = new Hashtable(5); env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFac...

Enterprise OSGi vs. EJB

Hello, i have an application server (JBoss) with some EJBs deployed. Now i must develop an OSGi application which i would like to reuse with my application server. I know that new application servers allows to deploy OSGi bundles in the application server itself. These are my questions: Could i simple deploy my OSGi bundles into the a...

Weblogic EJB deployement: classes in jar inside ear are not accessible

I'm trying to deploy an ear containing an ejb application into a weblogic 9.2 server. This ear is created using maven (itself using the ear ant task). Maven produces the following structure: myApp.ear - META-INF - application - MANIFEST.MF - dependency-1.jar - dependency-2.jar - ... - dependency-n.jar - myEjb.jar The mani...

EJB Vs WebService? Performance point of view

Hi, Well We have situation to decide now. I thought stackoverflow is best place to discuss. Background: We have 2 JVMs Enterprise Application server and one application deployed on each of them. we need to enable the business functionality invocation from one machine to other. Let assume one is client and another is server. Now from ...