ejb

XML using EJB 2.0

I have a real time database which stores details of trouble tickets.I need to retrieve this information and build a dynamic XML based on it.Is it possible using EJB 2.0.? ...

@EJB annotation - what error handling is appropriate?

The @EJB annotation can be use in "managed clients" to access an EJB. One can place this annotation in a servlet class, declaring a member variable. public class MyServlet extends HttpServlet { @EJB private MyWorkerInterface theWorker; } That @EJB annotation is expanded to JNDI lookups that (I assume) are executed when th...

Java Profiler for EJB Applications

I have a Web Application deployed to a local Glassfish server which I would like to profile in order to see which parts of my code is accessed most frequently. The code consists of JSF beans and Remote EJBs, with both being deployed in a single EAR. I tried using VisualVM to profile my Application but, although I can successfully connect...

Integration of an EJB into a Framework?

Is there a way that you integrate an EJB into a Framework? I mean... this will be the framework's own EJB. This is a way of getting it started. WeeklyTimerBean Tbean = WeeklyTimerBean.getInstance(); Tbean.bahbah(etc); No JNDI connection and it will be on the server. I'm just wondering if there is a way to do this. ...

ejb lookup failing with NamingException

I've added the following in my web.xml: <ejb-ref> <ejb-ref-name>ejb/userManagerBean</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>gha.ywk.name.entry.ejb.usermanager.UserManagerHome</home> <remote>what should go here??</remote> </ejb-ref> The following java code is giving me NamingException: ...

JMS queue in Weblogic10 EJB2 session bean able to send but not to receive

I try to receive a JMS message in an EJB2 (legacy sucks ;-) stateless session bean, in weblogic 10.0.1, with bean managed transactions. Queue definition from jms folder looks like <uniform-distributed-queue name="ReqQueue"> <default-targeting-enabled>true</default-targeting-enabled> <delivery-params-overrides> <delivery-mode>Non...

how to deploy client EJB on Sun Application server

I am new to EJB's and asked this question yesterday. that question went into lot of details and comments so I decided to ask the question again and get clear on some things. I have been given a .JAR file which is an EJB. I placed this .JAR file on my application's lib folder. But later found out that this .JAR file needs to be deplo...

ejb-jar.xml : Allowed Methods for container-transaction tag

Hi, Are we allowed to specify a method name with an access modifier of 'protected' or 'private' inside the <container-transaction><method></method></contaner-transaction> tag ? Below is a sample of the ejb-jar.xml: <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1"> ...

Unit Testing an EJB

I'm looking for a way to apply TDD to Session Beans. can anyone provide advices and links on how to unit test them ? how to use JUnit to do so ? P.S : I'm new to Test Driven Development and Session Beans. I'm using EJB v2. ...

java.lang.NoSuchMethodException: javax.ejb.EJBHome.getHomeHandle()

I'm trying to figure out why I'm getting the following exception when a client app is connecting to JBoss. I happens on startup, when the client attempts to connect to the server. java.lang.ExceptionInInitializerError at org.jboss.proxy.ejb.HomeInterceptor.<clinit>(HomeInterceptor.java:77) at sun.misc.Unsafe.ensureClassInitialized(Nati...

EJB lookup throws error: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe

When my application does EJB lookup using remote interface, I get following exception. It was working fine and in recently build something has changed which broke it. java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe at...

Is there an Open-Source Project that uses EJB?

Hello, I started reading recently about J2EE technologies and mainly EJB. Although I located quite a lot of Open Source Application Servers, I haven't seen any actual application that uses some version of EJB. Are you aware of any FOSS application that uses EJB? It is my understanding that EJBs are mainly focused on enterprise applicat...

message driven bean - notification when deployed?

is it possible to get notified inside the bean (mdb in this case) that its deployment procedure has just finished? ...

EJB Spec Violation

I created an EJB 2 named EvenementBean for test. I then deleted it. and whenever trying to deploy my .ear project now, I get these errors : WARN [verifier] EJB sepc violation: Bean: Evenement Section: 22.2 Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterpri...

EJB client error

I created an EJB 2. I deployed it on JBoss-IDE 1.6 and then, I created a JUnit test to access it. here's the code I used for the client : public class DossierBeanTest extends TestCase { protected DossierHome dossierHome; protected Dossier dossier; public DossierBeanTest(String argo){ super(...

Static vs Instance members in Stateless EJBs

I have a stateless session bean which needs access to a factory class. Is it best to declare this factory class as a static or instance member in the SLSB? Am I correct in saying that, as SLSBs are reused, only one instance of the factory will be created per bean (when going with the instance member option), as opposed to one instance pe...

Manually generate EJB client jar with Sun Application Server 8.2 / Netbeans project

I have a netbeans / Sun Application Server (Some EJB use) project which we've been building manually and now trying to move to an automated system. Software Used: Netbeans 5.1 Java 1.5 Sun Application Server 8.2 Netbeans used Ant so taking the actual build process out wasn't that complicated except for the EJB part. The normal buil...

suggestion on batch processing db records

I am working on developing a webapp (visual jsf, ejb3, hibernate on glassfish/mysql) that works with an existing legacy system. I have an 'employee' table (with fields such as name (String), location (String), etc.) which is separate from an employee table on the legacy db2 side. I do all of the webapp processing with my employee table....

MockEJB - JUnit Mockito - cannot rebind a mock EJB on second unit test

Hi I have a question related to MockEJB. I need to write unit tests to test a code that is calling a EJB. I use Mockito to write a mock for the EJB, and MockEJB to simulate the JNDI context. My tests look like this : @Test public void test1() throws Exception { // create a mock instance NetworkManager aMockManager = createMockNet...

How to call an EJB from another EJB ?

I use jboss-IDE. so, I created a project with many EJB's in the same project. now, I need a functionality exposed by EJB A in EJB B. so, I need to call EJB A in EJB B. How do I do that ? P.S : dealing with EJB 2. ...