ejb-3.0

weblogic appc: include generic arguments in the ejb client jar

I have an EJB returning a list of my own ValidationMessage objects: @Remote public interface Intf { List<ValidationMessage> validateFile(); } I'm generating EJB client JAR with weblogic's appc utility. The problem is that it does not include ValidationMessage class into the client JAR. Perhaps it does not see the dependency to thi...

it's possible configure a persistence.xml for multiple data sources??

hi i just want to know how configure in a persistence.xml two datasources one of the data sources have a jar outside from the other. I'm tried but i really don't if it's possible ...

configure spring to use my CM dbpool so I can inject the persistenceContext in my dao

background: I am using geronimo + hibernate + spring. Just using the JPA api's on an EJB backend that contains no servlets, no web.xml. I've been working on this for literally 41 days and have tried all types of combinations so now I'm asking on StackOverflow for help. Please bare with me I have not slept. I have a geronimo managed...

Generated primary keys start form 9951 instead of the 10000

Hello, I make use of: NetBeans IDE 6.7.1, GlassFish v2.1, Oracle 10g XE, JAVA 6 SE, JAVA 5 EE, From inside a stateless EJB I persist entities of type customer I have the annotation: @SequenceGenerator(name="seq", sequenceName="cust_id_seq") in the class customer so the primary keys are autogenerated in the database from the seque...

Implementing lazy loading of a many-to-many on EJB3 beans

I have two database tables, User and Role. I'm trying to set up a bidirectional many-to-many mapping in my application but I'm running into performance issues when eagerly fetching. The many-to-many works using a UserRole join table. My DTOs look like this (fat has been trimmed): UserDTO.java @Entity @Table(name = "[redacted].User") pu...

Remote lookup of slsb failing from jar file, although very similar lookup from a jar file being called from same place works.

I have a a number of jar files that perform rmi. These are all working except one, the problematic one attempts to look up a remote slsb in a different project. So the code is the same here: machineNameOrAddress = args[0]; jndiPortNumber = args[1]; action = args[2]; Properties properties = new Properties(); properties.setPrope...

Is @EJB not supprted in JBoss 5.1.0 GA?

I've been struggling for this for a while now. I'm trying to gear up for EJB 3.0. I'm using JBoss 5.1.0 GA as my application server. I started with very simple stateless session bean with local interface and a simple jsp-servlet client which invokes session bean method. All this while I've been trying to use @EJB annotation to inject s...

Learn EJB 3.0 really fast

Hello everybody, I am in an urgent need to put myself up to speed with EJB 3.0, like in a couple of days or so. Please don't ask... I have some years behind me as a programmer and worked with different technologies: RMI, JNDI, EJB 1, EJB 2, Hibernate etc so I'm not a stranger to all of this. But that was sooooooome time ago. I need a ...

Debugging transactions with Glassfish 2.1

Occasionally, I get following exception when running my Java EE application with Glassfish: Error in allocating a connection. Cause: java.lang.IllegalStateException: Local transaction already has 1 non-XA Resource: cannot add more resources. The application uses a single JDBC connection pool that is not XA-capable. However, I was not...

Rename the fields of ejbql query in ireport

Hi, im using iReport 3.7.3 with ejbql connection my problem is when i want get the fields from the query, the ireport sets the name of the fields with "COLUMN_1", "COLUMN_2" even if i use the sentence "as" the ireport get's me that name to the fields. Here's an example of my query select doc.docId as DocumentID, doc.transactionDate as T...

How to disable local @EJB annotation on a client? (glassfish)

Hi All, I have a an ejb3 jar file containing: 1) remote interface I1 and the stateless implementation IMPL1 (exposed to the client) 2) local interface I2 and the stateless implementation IMPL2 (used locally within the server application) IMPL1 has got @EJB annotation to inject local I2 (IMPL2). When I put the ejb3 jar to the client ...

Manually deploy SAR with EJB3 Beans inside for JBoss 5.1

I have EAR. This EAR is all-in-one application for JBoss 5.1. I need to change activated functionality of my application depending on configuration in database - run functionality on startup or not. I am going to put parts of functionality into several SAR files, put them into EAR. How to deploy them manually so that EJB3 Beans inside w...

What is the default classpath for EJBs?

Please forgive my pitiful knowledge of Java EJBs but, when an EJB is deployed to an application server as a .jar file, where do things like Hibernate and log4j first look for their configuration files (hibernate.cfg.xml and log4j.properties) in the .jar file? ...

Trouble deploying EJB application to JBoss when implementing persistence

I'm trying to implement EJB persistence, but I'm having trouble deploying my application to JBoss. In my application I have the session bean TeamMgr, which looks like this: package ejb; import javax.ejb.Local; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.Persisten...

EJB CMT TransactionAttributeType.REQUIRES_NEW doesn't work.

@Stateless @LocalBean public class MySLSB { @Resource SessionContext ctx; @PersistenceContext(unitName = "myPU") EntityManager em; public void T1() { em.persist(new MyEntity(1L)); //T1 created! /* wrong call to plain java object T2();...

Java EE 6 with GlassFish v3 and MyEclipse 8.5: Best Way to Structure Projects?

Hi all, long time listener, first time caller here. We are in the process of moving from BEA WebLogic 10 to GlassFish v3. We have successfully moved a massive project to GlassFish, and everything's working, but now we're planning for the future. Specifically, we are using MyEclipse 8.5 with a single Enterprise Application project (DCMH...

Seam Hibernate Serves same EntityManger instance to two separate threads

Hi, I am new to the Java / Hibernate / Seam way of development but I appear to have a strange issue with Hibernate and concurrent threads. I have a application scoped Seam component which is executed via EJB timers at a set interval (Orchestrator.java) calling the method startProcessingWorkloads. This method has a injected EntityManag...

Container Managed Transactions (CMT) for Web Services in JBoss

I'm exposing my EJBs (3.0) as Web Services deployed to JBoss AS 5.1 (using annotations @WebService ,etc). I 'm very satisfied with JBoss's transaction management, especially automatic rollbacks on exceptions. My question is, will Web Service endpoints also behave the same way as remote/local EJBs? or would I lose the Container Managed T...

Configure EJB3 with web.xml like parameters

Hi, I'd like to pass some parameters to a stateless session bean. I'd like to do something like I do when I configure a Servlet initial parameters in the web.xml file. Thanks ...

How is the return-value of SessionContext.getBusinessObject() different from 'this' keyword used in the bean ?

Hi, The SessionContext.getBusinessObject() is described in the docs as follows, Obtain an object that can be used to invoke the current bean through the given business interface. Parameters: businessInterface - One of the local business interfaces or remote business interfaces for this session bean. Returns: The busine...