Hello. I'm using EJB and JPA, and when I try to access PhoneNumber objects in phoneNumbers attribute of Contact contact, it sometimes take several minutes for it to actually return data. It just returns no phoneNumbers, not even null, and then, after some time, when i call it again, it magically appears.
This is how I access data:
for ...
Hi, I am new in Java EJB 3.0. It is possible to call a (session) beandeployed on JBossfrom a desktop application client?
Thanks in advance.
...
Hi, I have a Java client for a session bean, I want to send it an inputStream as following:
Note: I am working with EJB 3.0
public class SenderSimulator {
public static void main(String[] arg){
Properties p = new Properties();
p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
p.put("java.naming.provid...
Is it possible to make the container inject the same stateful session bean instance into multiple other stateful session beans?
Given the following classes:
@Stateful
public class StatefulTwoBean implements StatefulTwo {
@EJB
private StatefulOne statefulOne;
}
@Stateful
public class StatefulThreeBean implements StatefulThree...
Hi friends,
I'd like to know which is the best book for the preparation of SCBCD 5.0 exam? I've no experience in EJB developement, and I'm actually student. I've already cleared SCWCD and SCJP.
Can I go for HF? Is there actually no book of Head First for SCBCD 5.0 preparation?
...
Newbie to EJB, exploring CMP and trying to figure out the angles...
I'm using Weblogic 10.3. I've created entities, utilized them from a session bean via JPA and called the session bean from a command line app. This gave me CMP. When I tried to use the entities directly from a command line app via JPA without using the session bean, ...
Hi,
I am new to EJB. I have a requirement of calling a method of remote stateless bean and setting a value, before calling any method on the same bean. The value set from first method call should be available to second method. I know that a stateless bean can't hold instance variables values for next calls. Is there any alternative to m...
We are developing an application with around 400 database tables.
and have equal number of EJBs (All are Local interfaces and EJB is stateless) and one EJB is injected into another EJB by @EJB tag.
My doubt is, is having more number of EJBs have any effect on the performance on the application?
...
platform:
Sql server 2000
java 1.4
ejb 3.0
...
In JBoss 4.x, @EJB / @Resource annotations can only be used in EJBs. If you use a stateless bean or an MDB as an entry point, you can inject your resources using the annotations. However, if you have Pojo's that perform business logic and need to use these resources, they can not be injected via annotations.
I am passing the reference...
I want to ask for your prefered way to test JEE code?
I found only three project, that are trying to help to code unit tests in JEE environment:
http://jakarta.apache.org/cactus/ : Last Published: 2009-01-18
http://www.junitee.org/ : Last Release: 2004-12-11
http://ejb3unit.sourceforge.net/ : Last Release: 2008-05-17
So I wonder,
...
Question 1: As per the book I follow to learn EJB author told that every lookup creates a new stateful session bean. So, what I did is defined a method init() with @PostConstruct annotation with a sysout statement. So, that need to be executed for every Stateful bean instantiated. But the same is not happening. Consider the following cod...
Hi all,
I have a java EE application EE5 EJB3. I develop using NetBeans 6.7 and GlassFish 2.x
I need to have a configuration file (*.xsl, *.xml) that is deployment/client specific.
My questions are:
1) where do I put files that are external to the ear file?
2) How do I load the files into a session bean? can I use injection?
I mana...
which Stateless bean instance assigned to EJB object to serve the client, when two Stateless beans implements single remote interface and with same name
Ex:
@Stateless(name="KING")
public class One implements RemoteInterface{
}
@Stateless(name="KING")
public class Two implements RemoteInterface{
}
...
Java EE 6 offers (at least) two Dependency Injection mechanisms: DI annoations from Java EE 5 like @EJB, @PersistenceContext, @Resource ... and the new JSR 330. Can I replace the "old" DI annotations with the more general JSR 330 annotations?
Are there any benefits or drawbacks of the one or other approach? Which one would you use and w...
Does running an EJBQL UPDATE statement defeat the performance benefits of container managed persistance when compared to modifing the accessors on a managed entity?
I'm interested in this specifically for a database load / performance perspective.
For example, if I have an entity called MyEntity and I want to update myField1 and myFiel...
I am having a EJB 3.0 Session Bean which implements the Local interface, and I have a pure POJO also.
How can I inject a Session Bean into the POJO rather than manual JNDI look up in to POJO through spring(using @Resource and SpringBeanAutowiringInterceptor)?.
Is there any way to do that?
...
Are remote EJB calls, made from the same application server, always optimized as local, in-memory calls, and is serialization of data skipped in this scenario?
In other words, is it valid to work with remote EJBs all the time, thus achieving decoupling between application components, even if two+ EJB modules are deployed in the same co...
When calling remote EJB3 (Glassfish) from another EJB module, it is usual to have interfaces available, they are included as JAR file so that when you do JNDI lookup everything works as expected.
I have a situation where EJB3 JNDI name is determined at runtime, and my attempts to access the EJBs retrieved from JNDI in usual way fail, co...
Hi,
I'm looking for a tool (preferably freeware) which can visualize - in the form of a diagram the relationships of a set of entity beans in a a database.
Thanks in advance,
Johnny
...