James Joshy

Greenhorn
+ Follow
since Jun 04, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by James Joshy

I never worked on JSF or struts
Much deep should I delve into JSF for part-I ?

Is a very high level understanding, e.g knowing the request processing lifecycle and JSF usability/architecture, design patterns used, .. good enough ?

Think of <resource-ref> as reference to external resource factory ... like DataSource
<resource-env-ref> is rather a reference to the resource itself like JMS destinatinations. No middleman here

The bottom line, it is confusing .. just memorize ..
If your EJB needs to refer to an resource, it need to declare it either in a) deployment descriptior or b) with annotations.
If you use the following code you would be using option b)
If you remove , you have to use the DD.. bujhle ?



@PersistenceContext(name="persistence/InventoryAppMgr")

Sai Surya wrote:

1. Invoking an EJB located in a remote server from stand along Java client.

I cannot use @EJB annotation since there is no way for remote server's container
to inject dependency. So I need to use ACC to access an EJB located in a remote server.
I need to follow traditional JNDI look up to get a reference to the remote EJB.



I agree



2. Invoking an EJB located in a remote server from web application running on different server.

<same as above>



I agree



3. Invoking an EJB located in a remote server from a web application in a distrubuted environment.

In this case, since the environment is distrubuted, I can use DI (@EJB annotation) to
access EJB located in a remote server.


What is the definition of 'distributed environment' (apart from 'remote server' ) ?
Injection can be done by hosting container only, not remote container.
@EJB is nothing but , a) Create InitialContext and then b) JNDI lookup . Unless the EJB is registered (like a resource) in JNDI context of the webcontainer, how would it inject it ?




4. Invoking an EJB from any web application deployed in the same server and host.

I can use DI (@EJB) and it is straightforward approach.

am I correct?


agree since EJB is in container naming context

Mamadou Touré wrote:Bonjour Christophe,

I've read the link you suggested me, so does this me the following line should never be included in a bean class

package xyz;



Hi

Spec is talking about 'RUNTIME' not compile time.


Rethrow means throw the same exception it caught. System Exception would go out as SystemException
Thorw here refers to wrapping the exception as throwing again , so container is not throwing back same Exception