Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Adri Smith

Ranch Hand
+ Follow
since Jun 07, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Adri Smith

http://www.jdiscuss.com/
Adri
Thx you this is correct (I did some readings, therefore I can confirm)
[ September 10, 2005: Message edited by: Adri Smith ]
Soni could you tell me on what you base your affirmation ?

Thx,
Adri
Thanks you Roger,

If I follow your explainations, it means there are few cases in which we need to narrow:

* JNDI lookups of the remote home interface (your initial lookup of the bean's home).
* All calls to getHandle() or getHomeHandle()
* All other remote calls to business method returning a remote stub, and only if the return type of the method is not the same as the interface type to which you intend to cast it.

(I took partially this from your Post)

Therefore we do not need to narrow the result of getEJBObject and getEJBHome from the SessionContext (a cast is enough)?

I am right ?

Thanks to confirm guys, it will relieve my mind

Adri
Thanks you very much for replying.

I thought remote stubs must always be narrowed when you want to use the methods of the remote/home interface.

I dont see why we don't need a narrow for the method getEJBObject() from the SessionContext. For the following example I can understand that we have to make a narrow (to the remote component interface):

MyComp comp = (MyComp) PortableRemoteObject.narrow(MySessionBean.getHandle().getObject(), MyComp.class);

So why is rule not applicable for getEJBOject in the SessionContext interafce ? I am kind of confused... is the getEJBOject method an exception to the rule or am I misunderstanding this concept ?

Thanks a lot buddy,
Adri
Just a small question regarding the narrow method of the PortableRemoteObject Class.

Which steps are required to get the remote component interface using the EJBObject method of the SessionContext interface ?

In my point of view I have to narrow the object (because it is a remote stub) and then cast it. According to the mock we have only to cast it... SO what is true ? I am really surprise about this answer, if anybody can highlight me, it will be greatful.

Thanks for your help,
Adri
I do not know if anybody is willing to continue this thread but I really do think the question is relevant. In my sense the transaction existing in the method 1 should be "rollbacked" if bean1 is local (even if the transaction has been suspended by the method2's call). If the bean1 is remote it will depend of the catch clause.

If anybody can confirm me, it will be grateful

Thx,
Adri
Hi all,

As you all know when a system exception is thrown in a bean, the container throws a RemoteException to a remote client. Ok but we also know that when a system exception raised in a bean, the container logs it, rollbacks the transaction and discards the bean.

I am actually wondering in case of system exception thrown in bean whithin an existing transaction context if the container is always required to throw a TransactionRollbackException (which is a RemoteException) to a remote client .

My question is whether the container must throw the most specify exception ? is it ok if the container throws a RemoteException ?

Could anyone clarify my ideas ?

Thanks in advance,
Adri

[ September 07, 2005: Message edited by: Adri Smith ]
[ September 07, 2005: Message edited by: Adri Smith ]
Thanks for your reply.

It can be helpful indeed
Adri
15 years ago
Hi all,

I would like to know which book is the best to start on Web Services. I don't want especially a book that cover all the topics of the exam. I just want a recent good book to start learning web services.

Thanks in advance,
Adri
15 years ago
Thanks for your answer.

I am actually wondering if the following book is not better:

- Building Web Services with Java: Making Sense of XML, Soap, WSDL and UDDI
by Glen Daniels

BTW this book is almost one year more recent.

What do you think ?

Adri
Hi all,

I would like to know which book is the best to start on Web Services. I don't want especially a book that cover all the topics of the exam. I just want a recent good book to start learning web services.

Thanks in advance,
Adri
Thanks a lot.

This is clearer in my mind. Sometimes we are trying too much to find a reason why we are allowed to do things and not others and so on....

I will sleep better

Good luck if you are preparing for the SCBCD,
Adri
First I would like to tank you for your quick reply.

Ok I see the logic behind but I still do not understand why that would not be technically possible.

An sql insert is done just after the ejbCreate and in the ejbCreate we must have given the primary key and so on. But why can't we not give the relationship already.

In a database we can make it in one sql statement so why not in this case ?

Thx buddy,
Adri
Hi all,

I have read the HFE book but I still do not understand a pointregarding the relationships in entity beans. I do not know why we cannot set the relationships en ejbCreate and we have to make it in the ejbPostCreate.

In ejbCreate we have access to other beans.
Therefore I do not see why we have this restriction. Does anyone have an idea ?

I guess that is part of EJB law....

Thanks in advance,
Adri