Originally posted by Ann Basso:
Yes, that is what I was thinking but I don't know whether that will work. For example, if you want to get all the employees that are managed by an employee, how will you get that?
[ August 09, 2007: Message edited by: Ann Basso ]
Originally posted by Ann Basso:
I am wondering whether EJB 3.0 supports hierarchical relationship in Entities. For example, you have an Employee table having EmpID and ManagerID columns, where ManagerID contains an employeeid of the manager of that employee.
How can we use 3.0 entities to model such relationship? Any idea?
Originally posted by gowher amin naik:
what is reason behind "only session bean with BMT can keep transaction open at the end of a method"?
The enterprise bean must not attempt to define a class in a package.
Originally posted by James Frankman:
If the client is on a remote host, how does the client know where the server is? Is this done in the initialcontext. Is there some setting file you need to setup?
> 1. What does the name attribute in @Stateles(name="MyTempBean") signify?
2. Explain the following with example:
Dependency injection is performed when the interceptor instance is created, using the naming context of the associated enterprise bean.
3. "If an AroundInvoke method is overridden by another method (regardless of whether that method is itself an AroundInvoke method), it will not be invoked."
Example of this - Why this rule?
4. @PostLoad: Methods marked with this annotation will be invoked after all eagerly fetched fields of your class have been loaded from the datastore. No other persistent fields can be accessed in this method.
Does that mean fields marked for lazy loading cannot be referred to in @PostLoad method?
Originally posted by Shivani Chandna:
I had list of doubts, If some one can clarify them.....
1. What does the name attribute in @Stateles(name="MyTempBean") signify?
2. Explain the following with example:
Dependency injection is performed when the interceptor instance is created, using the naming context of the associated enterprise bean.
3. "If an AroundInvoke method is overridden by another method (regardless of whether that method is itself an AroundInvoke method), it will not be invoked."
Example of this - Why this rule?
4. @PostLoad: Methods marked with this annotation will be invoked after all eagerly fetched fields of your class have been loaded from the datastore. No other persistent fields can be accessed in this method.
Does that mean fields marked for lazy loading cannot be referred to in @PostLoad method?
Thanks!
Shivani
Originally posted by Steve Jerome:
I'm new to EJB and i'm trying learn from mikalai notes.when I try to run the calculatorclient java class it's showing following error.Can anyone tell me what the problem is.
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
...
Originally posted by Khaled Mahmoud:
I am new to EJB and preparing for the Sun Certified Business Component Developer.
I am now reading the book EJB 3.0 for Oreilly.
How many persistence.xml and application can have?
In the chapter about EntityManger section 5.3 the book says one of the places that a persistence.xml file located is at :
A plain JAR file within the classpath of a regular Java SE program
Does this mean that I can deploy many persistence units in java application each with its own persistence.xml file in a seperete jar file.
Originally posted by Senthil Kumar SS:
How dependency injection is done using DD file.I have seen the tag <injection-target> in an article. But haven't find that in specs. is this the only tag available. where can i find the information about injection tags