nibla jose

+ Follow
since May 25, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nibla jose


That link was a lot helpful. Thank you. few more clarifications.
Does all this mean that if we are using two vendors for web app and EJB we dont have a standardised mechanism to pass the JAAS context to the EJB?
How does it happen now for default? Anything in the spec?
The jaas context seems to be a thread specific storage in the web app right? Will this go to the ejb layer automatically when we are using the same vendor for both layers?
What have the 'username' and 'password' in JNDI initial properties, got to do with this? Any relation?
Please help me with this..

I have a web container implemented by one vendor and the ejb container implemented by another vendor. How can I pass my user information after authentication in web container to the EJB container? This is urgent. please help. What difference does it make when both the containers are implemented by the same vendor? Is there anything in the EJB spec which deals with this?

How correct is the name 'dependency injection'? I have heard the term IOC also. How much would you support the term 'dependency injection'?
When we have a mechanism of message priority, wont that break the data structure qualities of a queue? Is that desirable? Or can we always rely on the fact that a message put first in the queue will be read first than another one, regardless of its priority? Thanks in advance for all anwers..
In JMS, we can configure a synchronous message reciever using QueueReceiver.receive() method. Or we can do it asynchronously by setting a message listener. I have heard that the second asynchronous approach is better than the first approach when we have a lot of requests hitting our application.
Here is my understanding on this. Somebody please say if this is correct or not. I badly need this.
When we have say, 100 connections to the application, the synchronous connection initiates 100 live connections to the queue and lsitens on it. So we have 100 live connections. In the asynchronous way, if we set a message listener, only one connection listens on it for all the 100 listeners. Is this correct???

Or is there anything more to it? Help me please...

This is no different that creating a new collection everytime you want to add something to the collection -- it doesn't make sense to do that.

That is very good way to look at it. An object collection for different threads... Thank you henry. Makes sense now. the 5th question. Dont bother. I was too hasty and dumb.

Also help me on how good it is in performance. Because in some sites i read that the performance can be a pain. I was actually thinking of implementing 'a single point access' to the servlet API from a project using struts 1.3. Struts 1.3 automatically doesnt provide one like JSF or others (FacesContext.getInstance().getExternalContext().getRequest() ) . So in the end i have to pass the request objects across the all the unwanted classes. How advisable it is do so?

I have some doubts in it.

1. If i have 5 threads, how many ThreadLocal objects will be there? One or Five?
2. Does the ThreadLocal object constructor has to be run each time any thread stores a value?
3. Or is it just that only the three methods, get, set and initialValue are thread specific? Is not the constructor thread specific?
4. Is it always better that we create the ThreadLocal object as a static reference?
5. What happens, if it is not a static reference and if the object which holds it gets grabage collected, but the thread doesn't die?

If my idea is correct (which i am sure is not ) ThreadLocal object is not something which was to be implemented as an object creation. Because it is not a regular object and it has to bypass a lot of ideas like these. I would say the functionality of set and get methods were better of as static methods like below.

Thread.setThreadLocalValue(String key, Object value);
Object Thread.getThreadLocalValue(String key);

Is there anything that we gain from making it like an object creation?

Thanks in advance for all kind answers..
Thanks manuel aldana,
The reply was helpful..
In which folder does your JSP compareTestRunResults.jsp reside??
12 years ago
There is a resource reference given in the web.xml. The server checks whether the jndi reference is there in the server's jndi context while deploying. It seems to me like you are trying to run your first struts app. If so comment the resource reference that you have given in the web.xml.

Object factory for MyBean instances.

And try deploying again. That might work. But if you really need this. I guess you need to give the EJB reference in the server.
12 years ago
@manuel aldana..
Thanks for the reply..
But does it depend anyway on the archiving (JARing), like if
1. we are archiving each domains/modules into separate EARs OR
2. we are archiving each layers into an EAR or WAR (like subsystems) ???

Do we need to take account of the mode of archiving for delivery? I know we can archive parts of a java package in single JAR and the other parts in another? But is this a good practice?

Presently, in my case, I will be archiving all my business classes as EJB Jar. All the modules that i develop is to be run in a sinle EAR. So I have given the package structure as '' so that when i pack the source files as the EJB Jar all files under '' will be in a single JAR. Does this sound okay? Is this the right approach to do package design?

In the Oreilly JMS book page 29, it is told that

The TopicSubscriber receives messages from the message server one at a time (serially).
These messages are pushed from the message server to the TopicSubscriber
asynchronously, which means that the TopicSubscriber does not have to poll the message
server for messages. In our example, each chat client will receive any message published
by any of the other chat clients. When a user enters text at the command line, the text
message is delivered to all other chat clients that subscribe to the same topic.

How does a network client get a message from the JMS server asynchronously without polling the server?
What do they mean by it? Please explain....
Please explain how to use ThreadLocal class with a valid example.. All examples i get on net doesnt explain in detail? How good is it to use the ThreadLocal class for implementing Thread specific storage for user attributes and related ones in a web application?
I have 4 layers in my application. Also my requirement needs me to implement around 9 modules in the application. How should my package structure be?





1. Which one is more desirable and Why?
2. Is there any general rules to package the classes like this?
3. Are there any standards for this?

All kind replies thankfully appreciated.

Thanks for the answers.. It makes sense..