ejb-3.0

"Stored procedure 'xxx' may be run only in unchained transaction mode." error when calling a procedure from a DataSource, in an EJB context.

We have a Database in Sybase, which we access from a Java server. Access to the DB was made directly through the Sybase driver, using DriverManager. It was working correctly, we were able to call our stored procedures. Recently, we are migrating to an application server (on JBoss 5), and the calls to the database are now made through a...

override persistence.xml in ejb3

I am facing issue to override persistence.xml in jboss and with Hibernate JPA provider, I spent couple of nights but I couldn't solve it. I am using jboss + hibernate + mysql + ejb3. My requirement is I will provide the connection URL and the persistence unit will connect to the DB but it will be dynamically. so my code below. If anyone ...

Glassfish, EJB3, SOAP web service and basic authentication

Hi all, I'm setting up a glassfish server with a single EJB3 as a mocked up backend for a POC. Everything was working fine until I went to add some basic authentication. Just plan text userid and password, nothing sophisticated for this job. I added the following annotations to the EJB: @WebService(name = "Banking", serviceName = "Banki...

JMS sync request-reply from stateless EJB

Hi, I have a system based on JMS queues that enable the whole system to work in async fashion. Now, for some periodic tasks I need to execute some non time consuming tasks in sync way, so that I can do something with the result right away, without using a database for storing request and pairing it with result (as with async operation)...

javax.naming.NameNotFoundException

Hi I am running an example of ejb using JBoss5 Container. I am using an example from here(Part one). In the example I deployed bean in JBoss and an application in Tomcat(to acces the bean from JBoss). I am getting the error in the screen of tomcat server javax.naming.NameNotFoundException: greetJndi not bound ( greetJndi is the jndi-...

OC4J server DB persistence - queue message getting retrieved multiple times

Hello, Thanks for trying to help ... We are using oc4j server 10.1.3 and oracle 10g database and using database persistence for the the MDB (EJB 3.0) in the application we have 3 application servers and connected through the load balancer in the production enviornment As we are using database persistence the messages are sending ...

how to implement EJB in My senior?

Hi What is happening in my case is that the Bonita studio creates the task in its environment Env1, and that my Java class tries to find the task in its environment Env2. However, both environments are independant. If i need to have 2 different Java process to manipulate the same environment via API, i'll have to export the bonita API ...

In EJB3, How to implement inheritance for Session Bean?

We want to achieve following things: Create Abstract Stateless session bean Create stateless bean by extending the above bean. In Service class, based on type container will inject appropriate ejb bean ...

JAX-RS and SLSB's

Hey guys, Transforming some SOAP web services in to REST. It's been a painless process although I've encountered a problem in exposing a stateless session bean as a RESTful web service. Basically if the bean implements an interface and also has Jersey annotations it will not deploy with a object is not of declaring class error. Remove ...

How to implement generics using JPA/hibernate EntityManager and EJB3.0 ?

I have an slsb holding my business logic, how do I use generics to change the following three methods into one generic method ? The first two are the same db, the third is a different database. Also do the methods require further annotation in relation to transaction ? @PersistenceContext(unitName = "db") private EntityManager myEntity...

unit testing code which uses JPA & JTA

I use 2 separate database, so i have to use JTA to handle distributed transactions.So either either both db have to commit or both rollback. I use open JPA and JTA.Now to unit test the code using junit ? I get the following error when i try to run my code which handles distributed transcations.I had posted similar question on this sit...

Pooling of Stateful Session Beans

Is it possible to do instance pooling of stateful session beans.. like if a stateful bean instance is being passivated, during the execution of prepassivate() remove all the state information associated with it and send it to the pool, if a request is received from a client during the postActivate() restore the state to an instance picke...

EJB calls from grails to glassfish

Hello! I need to use EJB remote calls from my grails application. For this in previouse Servlet application I used client glassfish jar(gf-client.jar) and is's worked. How I can include gf-client.jar into build path in grails app for call EJB methodth? thank you. ...

When to use @TableGenerator?

Can you tell me when to use it and why should I create a new table just for keeping primary key while most DBMS now support auto increment and you can adjust it easily? ...

I have an slsb in ejb3.0 with a number of methods, do I need to annotate each method with transaction attributes ?

class decalaration: @Stateless @Local( { IMyLocalSLSB.class }) @Remote( { IMyRemoteSLSB.class }) }) public class mySLSB implements IMySLSB { private EntityManager em; and now some methods for inserting/updating and deleting db records are transactions annotations required, I thought they were not as jboss and EJB3.0 handle them using...

Long Polling with Java and JBoss

I'm looking for an example, how to implement a longpoling mechanism in java. I would love to use a stateless EJB. I know that something like that would work: @WebService(serviceName="mywebservice") @Stateless public class MyWebService { @WebMethod public String longPoll() { short ct = 0; while(someCondition ==...

How to acccess an EJB ?

Hi, I am trying to develop a Basic EJB3 application on JBOSS 4.2 in Eclipse I have created an EJB project in eclipse. The following are my remote and local interfaces. package com.test; import javax.ejb.Local; @Local public interface HelloWorldLocal { public String getGreeting(); } package com.test; import javax.ejb.Remote; @R...

Deploy EJB 3.0 module on different-2 machines

dear readers, i have done ejb 3.0 using netbeans but my problem is that i want to create more than one ejb module with some business logic and wants to deploy each module on different-2 machines. After deploying on diff machines i want above mentioned module communicate with each other. So if anyone has solution of this task please feel...

Creating EJB in JDev 10.1.3.4 doesn't return any data

Hey folks, I am using Jdev 10.1.3.4 and followed instructions here: http://www.oracle.com/technetwork/testcontent/ejb-30-097728.html#t3 although every thing is going fine, .... ...

GWT + EJB 3.0 + Eclipse + Java EE + Weblogic 10g

I'm pretty new with EJB's and GWT but I've been using Java for a little while. My question is: How do I get GWT and EJB's running all together on eclipse? I keep getting pretty severe memory issues with it all together. It consumes 600mb of VM and 200mb of mem and every other operation I do (i.e. open a .java file or build), it crashes ...