Win a copy of Head First Android this week in the Android forum!

Dani Mazzuca

Ranch Hand
+ Follow
since May 21, 2003
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 Dani Mazzuca

Hi All,

I was participating in meeting about a Web Service project yesterday and I was surprised when I discovered that the architects where planning to use their own in-house Java API instead of using JAXB or JAXP APIs. When I asked why did decide that, the answer was:

�JAXP and JAXB are not thread-safe APIs�

Well, now I am more confused, and I would like to listen to other opinions. I mean, I know that many Java classes are not thread safe (like for example, clases in the Collections API), but, in the case we need to use a class that it is not thread safe in a concurrent environment, we can either control access using synchronization, or in same cases, use different instances in each thread.

I should confess I am not an WebService expert, however, as far as I know, even if many classes in JAXP or JAXB are not thread safe, this is not a valid argument for not using them. Am I right?

Could someone expert in WebService tell me if there is something about thread-safety, JAXB and JAXP that I am missing? I mean, something important than we may consider not using them in a WebService project?

Than you in advance,

DaniMazzuca
[ July 12, 2005: Message edited by: Dani Mazzuca ]
16 years ago
Mike,
Where did you get that information? Did you receive an e-mail asking you to participate in the beta exam? Who is involved in the new release? Are the objectives already defined?
Thank you in advance,
Dani Mazzuca
Hi,
I didn't find nowhere how the acknowledge process of a MDB occurs when we are working with CMT and we declare the onMessage() method NotSupported. Does it occur? When? At the end of the onMessage()? At the beginning of onMessage()? Is it undefined?
Also, is the <acknowledge-mode> tag value going to be considered in this case?
Thank you in advance,
Dani Mazzuca
[ April 05, 2004: Message edited by: Dani Mazzuca ]
Hi Baskaran,

Originally posted by Baskaran Vengesanam:
I would say, ejbCreate() method is the right place to have "Initialization code", no matter it is for SLSB, SFSB or MDBs. The reason being, you can do anything you need to from this method, including things you can't do in setSessionContext(). See HFE Page - 195 (point 3).
Hope, this answers your question.
On the way to certification.


I also think that it is better to put the code in ejbCreate() method, although I am not sure of that. However, note that HFE page 195 (point 3) is referring to Stateful session beans, especially por the purpose of passing arguments values to the bean. This is not the case for SLSB and MDB.
Dani Mazzuca
Hi,
Which is the most appropriate place to put a code that caches a JNDI InitialContext object or a JDBC data source object for SLSB or MDB? Is it setXXXContext() or ejbCreate() method? Pros and cons for each one? (please, for this time forget the ServiceLocator pattern; I just want to know where is the most appropriate place to put initialization code).
Thanks in advance,
Dani Mazzuca
Hi Richard,
I didn't read the book. However:
1) All JMS messages are async, i.e., the sender sends the messages and doesn't block for the answer. What they call "sync" and "async" is the way you receive the messages. You can receive them using "receive" (sync) or you can use "listeners" (async). You can use both, sync and async receiving for both, queue and topic. As far as queue and topic, the differences are that in queue, you are able to have almost one receiver. Also you can send the message to the queue, and after that, read them, without having the receiver to be connected at the time the messages arrived. Topic can have multiple receivers of the same message, however, they must be connected at the time the messages arrive. With a topic-durable option, you can have a Topic, that relax this last condition, in that, the receiver can register to the topic, but after that, it can quit, and can read the messages in a later connection (provided it will use the same ID and subscription name)
2) I think that if you are using a Topic (not durable), and at the moment the message is delivered, the client is not "online", you loose the message. To avoid this, you use durable topics, or queues.
Dani Mazzuca
Hi Marti'n,
I am just curious like you. Web certification is going to be updated to JSP 2.0 and servelt 2.4 in some months. EJB certification deals with EJB version 2.0, and would be updated to 2.1 in a year or so. Today seams to be a natural path to take EJB certification before the SCEA one, however, you must go back to EJB VERSION 1.1 for the SCEA!
Although SCEA deals with architectural things like UML, patterns, security, layers, scalability, etc, it is actually based on J2EE technology, but based on the old version 1.2, and many things have changed since that version.
I am also worried about that. It seams that SCEA froze. Somebody happen to know if there is someone at Sun thinking to work in the update of objectives to J2EE 1.3 (or 1.4)?
Dani Mazzuca
Hi John,
I was not reading about the new Business Service pattern, however, as far as you justify your point of view, I think it would be no problem in the exam.
I also found BD very useful. It creates a layer between client and business, so that, clients don't know at all if the business methods are located remotely or locally. Note that one of the problems is with RemoteException (that I suppose you also have to deal with, in the interface defined by the Business Service pattern). If you don't implement BD, clients must be aware of RemoteException, so you lock clients with a REMOTE business implementation. If you decide latter not to use EJB, because you don't want to spend money/resources in a application server or whatever, you have to change client code. This would be simplified if you have the business access encapsulated in just one place - Business Delegate.

Dani Mazzuca
Two more suggestions:

6) Authors choose 25(n) best questions/answers/comments, and then the random program choose the 4(m) winners

the intention here is to limit complaining to authors through the random program; it would also consider quantity, but at the same time quality, i.e., if someone participate with many good questions/answers/comments, she/he would have more than one entry in the author's list; at the contrary, if some rancher post "empty messages", she/he would have less opportunities to be chosen by the author.

7) Create a special "room" where ranchers may exchange ideas with authors, out of the book promotion

messages posted in this "room" will not be considered for the book promotion; this "room" would only focus on authors dialog; its intention is to promote smooth author conversation and reduce "empty messages" and disturbance.
Dani Mazzuca
18 years ago


What I want to say is that why a person wants to waste his/her time on posting a thousand of messages just to win a book... Instead of wasting time on posting like that, why don't we read a book and get knowledge from it? I guess we(most of us) are programmers(earn pretty high salary) and I do believe that it's not a burden to buy a book with our own money...


Completely agree. The point is that, there are no means to guaranty that a person will not post "a thousand of messages just to win a book... ", and disturb, what I think, is the most important part of the promotion - the opportunity to exchange ideas with authors, like Alur-Crupi-Malks, Marty Hall, Kathy Sierra, etc.
It is not about complaining. It is just about calling the community attention to some problem occurring during promotional days, and giving suggestions to improve it.
Dani Mazzuca
18 years ago
Jeanne,
about "links to articles." I agree with you, links are usually very helpful and welcomed. But, again, promotion days are atypical ones, where ranchers usually ask questions directly to authors, and expect answers from them. In practical terms, if some rancher says:

Hi,
I have a problem running a client that access an EJB located in WL7 ...

and some other rancher answers with a link where there is a discussion and a workaround for that problem, perfect.
But, if during promotional days, a rancher asks:

Marty,
would you please give us your personal opinion about ...

you are trying to start a dialog/discussion with the book author. You are expecting an answer from them, not a link to a web paper.
Dani Mazzuca
18 years ago
Hi,
there is a recently opened topic on the appropriate forum(Book Promo Suggestions ... ), where we can discuss if the promo might be improved or not. Let's discuss it seriously, with no offences, please.
Sometimes, e-mails and forums are not good tools for people to exchange ideas; it is very easy for someone to get offended. So please, try to remember John Lennon, "peace and love", etc. Forget all the things in the past; let's try to start again.
Dani Mazzuca
18 years ago
Again, I would like to point out that these are not only book promo suggestions, but also suggestions to improve "dialog" with authors during promotion.
1) limit the book chance to a maximum of 2(n) per rancher:
You can enforce it ordering the messages by rancher name/number, and discarding all that have more than 2(n) entries (this might require some update of the current program in use).
2) don't consider answers; only questions::
This might make sense because promo days are very atypical ones. Observe that during promo days, most questions are directed and intended to be answered directly by authors. The rancher that is asking really expects to see the book author answer. For example, if Pradeep Bhat asks,

Marty,
Do you think that it will be next major thing in J2EE web application world?

he is mainly interested in read the personal Marty opinion, not Dani Mazzuca opinion. And most answers are expected to come from authors in the promotion.

3) some rancher that win a book may not participate in the next 3(n) promotions;:
Again, I believe in the good intention of ranchers, and if some not well-intentioned rancher changes their name/address, which I believe would hardly occur, he/she would be risked to be discovered and banned. Also note that the current winner selection is actually been done in some kind of lucky random way, considering only quantity, but not quality. So in practical terms, I think this rule might be effective.
4) A new one, let authors decide who is going to win:
the ball can be passed to authors; they can decide based on quality, not only quantity, considering better questions, better comments, participation, etc. JavaRanch will also have less promo administration work.

5) I discarded a Duke-dollar-like idea, because it is complex to implement. But note, that Duke-dollar idea, where who asks gives points/DukeDollars to the best comment/answer, promote both, participation and quality at the same time.
Dani Mazzuca
18 years ago
Hi,
follows some suggestions to improve book promotion.
I did put the suggestions in the wrong forum some days ago(Java Ranch Servlet), and I was asked to put them in the appropriate one. Please, don't get irritated if you don't like the suggestions, they are just suggestions for improvement, not only the promotion, but mainly the "dialog" between book authors and ranchers.
I have just noticed that the promo work is been done by the collaboration of only one person, and that involves a lot of work, so maybe the suggestions are not applicable in this case. Also I know Sheriff Thomas, and others ranchers, are completely against these ideas. Anyway, thanks JavaRanch for the book promotion and thanks Thomas for your effort. Here are the suggestions:
My impression is that book promotions rules should change. Why? I think the intent is to promote the book, have the opportunity to "speak" with authors, promote high level discussions in JavaRanch about the subject, promote JavaRanch, and also have a chance to win a fresh book. The idea is pretty good, good for everybody. I confess, the possibility to discuss with authors and have with everybody a highly technological discussion is the thing that attracts me more. Things would be all right if ranchers make use of this promotion, but ... not abuse.
What I saw happening in the last 2 promotions was that some(few) ranchers are hanging on all the time at JavaRanch, answering as soon as he/she can, each and every question that suddenly appear, even if they didn't have a valuable info to add to the discussion, with the main intention to have one more chance to win a book. Some ranchers answered with only a link to some articles in the web. Note that we usually don't go to the ranch looking for a paper in the web, what we want is to participate in a high level interesting discussion with authors and other ranchers.
I confess I got irritated with some situations. No personal offense, seriously, I really believe in the good intention of ALL ranchers. Nothing wrong in wanting to win a book. Sure. I would like to win a book either.
So, I would like you to analyze the possibility to change rules, so that this promotions would not become a dispute to see how many messages I send to win a book. Some examples:

1) limit the book chance to a maximum of 2(n) per rancher:
i.e., if someone wrote more than 2 (or n) messages, he/she will only participate with a maximum of 2(n) entries in the promotion. With this you discourage ranchers that write every answers with the only purpose to win a book, without adding any valuable contribution to the topic, i.e., you avoid abuse. And you also stimulate others to participate.

2) don't consider answers; only questions:
with this you stimulate ranchers that want to have a high level technical discussion in a topic, avoiding the abuse problem mentioned in the previous item, i.e., answers without any value. Of course a person whose only intention is to win a book, can also abuse and ask a bulk of unvalued questions, but this doesn't bother other topic ranchers that have other intentions, and also item number 1 can limit this abuse.
3) some rancher that win a book may not participate in the next 3(n) promotions;
this doesn't limit the number of books that a person can win, and of course, doesn't limit her/his participation in the discussion, only in the promotion. This only avoids abuse and tries to give better opportunities and stimulate people that never win a book. Will a rancher be stimulated to participate in a promotion that she/he knows in advance that the winners will come from few people that frequently write a bulk of messages?
4) a combination of all above, or whatever, any idea that can improve the dialog with authors.

Dani Mazzuca
18 years ago
Kyle,
It is interesting to know that big companies are behind the JSF scenes, particularly, Macromedia. Could you elaborate more, with technical comments about JSF, why do you think it will be the next big thing?
Dani Mazzuca
18 years ago