I'm developing a Java EE 6 application using Glassfish 3.1, B06.
To secure my app, i'm using a JDBCRealm and programmatic security. This works fine to check username and password. But when it comes to declaring security roles, i have a problem:
To use Security Roles in Java EE 6, i have to declare those roles both in the EJB deployment ...
I'm wondering, why not use Session Beans instead of Message Driven Beans ?
If you can call remote methods from EJBs, so why bother sending/receiving messages with Message Driven Beans (which is more difficult to develop than session beans) ?
In which scenarios Message Driven Beans become useful ?
...
Hi, I whould like to know some opinions about OpenEJB: we are considering to use it on a new project, but really didn't found many opinions about it.
So, here is my question: how about it? Does it perform well? Is it stable enough for a production environment?
...
i have this in the server:
class Person{...}
and
@Stateless
public class HelloServiceBean implements HelloServiceLocal, HelloServiceRemote {
public Person getPerson(String name) {
return new Person(name);
}
}
And i have this in my client (in some different JVM):
public static void main(String[] a) throws Exceptio...
Hello guys!
I am starting a new enterprise project and use Glassfish 3 as an application server and NetBeans 6.9 as an IDE. I have some EJBs which I want to access remotely from a desktop Swing application. AFAIK there are two options - either use plain JNDI lookup or run the Swing application in an application-client container and use ...
Hello All!
Now i'm working with EJB 3
in Stateless Bean i create method get all instance of entity About
public List<About> retrieveAllAbout(){
return em.createNameQuery("About.findAll").getResultList();
}
Now i want get one row of list to pass to js page. How can i do it
in jsf page ( xhtml) i want show one value of li...
hello all new problem i cant solved
i have 1 entity below
package com.entity;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQue...
Hi,
how can I configure OpenEJB to work with an external instance of ActiveMQ?
We already tried the configuration on this link http://openejb.apache.org/3.0/jms-resources-and-mdb-container.html but it did'nt work at all.
What should we do?
...
What is the best Maven archetype to use on enterprise application in java using EJB and JAX-RS, considering that in a near future i will have to make a front-end in JSF2 using as the backend EJBs used with the JAX-RS?
...
Hi Guys
I am just trying out examples of entity beans. I am using JBOSS 4.0.0, EJB 2.0, MyEclipse 8.6. Reason for using JBOSS 4.0.0 and EJB 2.0 is just for learning sake. I am reading head first book. In the process help me if I made any mistakes. I wrote a build file using ant to deploy this in deploy directory of JBOSS. Don't know whe...
I know I have to merge the entity before removing it, but I never thought I have to do it inside EJB. First I have these:
e = (Event) scholarBean.merge(e);
scholarBean.remove(e);
in my managed bean. It give me this error
java.lang.IllegalArgumentException: Entity must be managed to call remove: com.scholar.entity.Event@998, try mergi...
hi expert, i'm new for web application, previously I did mobile app, now start doing web app, I'm intermediate for java,jsp,servlet, and plan to learn hibernate, spring, struts, ejb, which one i should learn first and where to start, bit confusing
thanks in advance
...
Hey guys,
I've implemented an EJB3/JPA web service without any major problems, and now I've moved on a Spring-WS/JPA web service. Both are being deployed to Glassfish.
My understanding of JPA is limited, but by default transactions are container managed? How do you change this? With EJB3 things were straight forward as I could just inj...
Does EJB internally uses Sockets while exchanging Beans to Clients?
...
Hi
I have just begun reading up on EJB's.
Even as I venture into it I have a few questions based on what I have heard about them.
Do applications using ejb's always have to be deployed as EAR ?
Can applications containing EJB's be deployed just like other other java web projects using ECLIPSE and without using ANT
...
My application has long running transactions and hence I tried the option session.close() at the end of every method to ensure that the connection objects are not held indefinitely for long time.
When session.close() option is used, I could see that the Hibernate's session object and the corresponding Connection object obtained from se...
Has anyone had success building a SEAM Application without using Stateful session beans? There is some confusion on a new project in which I think several stakeholders have essentially 'banned' stateful session beans... but some development is being done in SEAM.
Most of the literature on SEAM encourages the use of Stateful Session B...
We have a setup in which EJB A is running on server A, and another EJB B is running on server B. EJB A connects to EJB B via IIOP. This setup normally works, but if server B is restarted, EJB A will fail until server A is restarted too.
The issue is that if server B is restarted, all calls to InitialContext.lookup by EJB A fails with a...
I have tried for hours to get my project working but the EJB part is still failing with a java.lang.ClassNotFoundException: org.slf4j.LoggerFactory (I want to output some log in my EJB).
The layout of the project is the following:
|-- nnWeb-ear
| |-- pom.xml
| `-- src
| `-- main
| |-- application
| | `-...
I have a @Stateless @Local Bean successfully deployed in an ear. I can see the new EJB 3.1 standard global JNDI name when I browse the JNDI tree. (java:global/product/product-ejb/ProductManagement)
I want to use this EJB in a different application on the same app server. Do I need to add a remote interface for this EJB?
...