Arun Natarajan

Ranch Hand
+ Follow
since Jul 21, 2006
Merit badge: grant badges
For More
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 Arun Natarajan

Did someone restart the app server? Sounds simple, but hey that happens sometimes too :-).
15 years ago
You can look at this URL for one of the several available implementation of AOP.
http://www.eclipse.org/aspectj/doc/released/progguide/index.html
15 years ago
Sounds like what you are looking for is aspect oriented programming. AspectJ is one implementation that you could try.
15 years ago
* As mentioned by Bear Bibeault, if you are trying to have a distinct HTTPSession for each browser window, it is going to be a complicated and messy implementation if at all possible, and I would avoid it at all costs.

* I assume you have a 'user' object in your session that you populate when a user logs in.
I would not recommend replacing the session info with a different user's details altogether. Even if the super user wants to do things as a regular user, there should be a record of the fact that it was done actually by the superUser acting as the regular user. If your session has a 'user' object to identify the current user, you could add a 'loggedInAs' to identify the user being simulated and use the loggedInAs to determine what functions/ buttons/ links/ screens are available to the user.
If you really want multiple browsers each simulating a different user, then you would change the loggedInAs to be an array or list and pass back and forth the simulated user identifier. Remember that all these browser windows are still using the same HTTPSession.

Also, with your current implementation, after the superUser clicks on the user_1 in the search results, if you are really replacing the session with the user_1's details, then when superUser tries to click on user_2 you should be displaying a 'You are not allowed to do this..'message because to you it would appear as if user_1 is trying to perform something only superUser can do.

Hope this makes sense.
[ June 16, 2008: Message edited by: Arun Natarajan ]
15 years ago
This may not be related to the exam, but I thought would be of interest to an architect.

How do you estimate server resources needed for running a J2EE application? Say you are starting to build a J2EE application and the management wants to know what servers(number of machine/processors, memory, etc) you need when you go live so that they can procure them in advance. How would you estimate this?
What are the factors you would look at to come with this estimate.

Thanks in advance.
If transaction T2 fails, T1 may still commit fine and vice-versa.
The home interface for creating instances of the beans, why do you want to put business methods in the home interface? It is a different case for entity beans, because with entity beans you would want to do non-bean specific things for which you need to write business methods in the remote interface.
The connection must be closed and made null.
1) How does the container decide either to "passivate" or "to time out and kill a bean" when a stateful bean is in method ready state?
'Timeout/killing a bean' is related to inactivity on part of the bean, only a time factor is involved in this. 'Passivation' is primarily a memory related thing though there is a time factor involved in this too. Consider a server that is running an EJB application with a bunch of beans. As more and more stateful beans get created, the server's memory gets used up. At some point if the server finds itself short of memory to handle requests for new beans, it will look through the existing beans and pick the ones that have been most inactive and passivate them to free up memory. Different servers provide different options in configuring the passivation criteria.
Besides this the server will also be monitoring the beans to see which ones have been inactive for a period greater than the configured time-out period(say 20 minutes). Clients of beans that have been idle for more than this period are considred to be no longer using the application and so such beans will be killed. The server can kill beans that are already passivated too.
2) I understand it is container's sole decision to remove/kill a stateless bean. So When dealing with a "stateless session bean" should "remove()" be called by the client? I dont see remove() being called in the HFEJB examples. What exactly (and always) happens when the client calls remove() while dealing with a session beans?
Stateless session beans do not get a remove call even though the client may actually call the remove method. For statefull session beans remove is invoked when the client calls it and any code written here is executed.
3) Should the database connections etc be closed before ejbpassivate completes
ejbPassivate is called before the server passivates the bean, and the bean should be brought to a passivable state before it can be passivated. You would write code in the ejbPassivate to take care of non passivable data, such as database connections.
Thanks Prashant,
I do not plan to take the exam any time soon. I wanted to start preparing and given the lack of experience in administration I thought getting the software and playing around would be a good place to start.

Regards,
Arun N
Hello All,
I plan to prepare for the 'Test 252: WebSphere Application Server Network Deployment V6.0, Core Administration'. I wanted to install the app server on my personal machine but found only a trial version availabe for download. I also noticed that there is a 'WebSphere Application Server Community Edition V1.1'. I was wondering how close the two are and if for the purposes of the exam I could use the community edition.

Thanks,
Arun N
Hello All,
I cleared my SCBCD with 92%, thanks to the help from all of you.
My primary source of preparation was the HFEJB. I also did the practice tests on ejbCertificate.com. I did have the EJB specs but never looked at it. HFEJB is excellent.. just read through it twice and you should be good.

Regards,
Arun N
17 years ago
If bean 'A' is in a bi-directional relationship with bean 'B', that means it is a cmr field in bean B. And only local interfaces can be used for cmr fields. hence the answer A is correct.

Regards,
Arun N
I too think the NoSuchObjectException and NoSuchObjectLocalExcecption should be thrown. However in a question if these exceptions are not available, then it would not be wrong to say RemoteException (or EJBException) will be thrown because these are the parent classes.

The NoSuchEntityException Imran is talking about is something that you can throw from your bean method when you find that the underlying entity is no longer in the database(typically used in BMP entity beans). This will be rethrown by the container as a NoSuchObjectExcecption.
I am not sure if i can say conn.commit() and that is part of my first question. Is it legal to say conn.commit()?