Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Mohit Agarwal

Ranch Hand
+ Follow
since Mar 30, 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 Mohit Agarwal

Hi,

I have a question.
The methods wait(), notify() and notifyAll() makes sense for a Thread only.
Then why are these methods defined in the Object class instead of Thread class.

Please provide your comments on the same.

Thanks
Mohit Agarwal
Any comments/suggestions from any one?
9 years ago
Hi All,

I am trying to use data-base as content-store using Alfresco, but i am encountering some problems:

I am using the implemenation provided at https://issues.alfresco.com/jira/browse/ALFCOM-1077.

I have deployed all the related files and made changes to the content store impl class in content-services-context.xml as discussed in
http://forums.alfresco.com/en/viewtopic.php?f=6&t=317 by derek to:


<bean id="contentService" parent="baseContentService">
<!-- Added the New Content Store entry -->
<property name="store">
<ref bean="blobContentStore"/>
</property>
</bean>

The bean-id blobContentStore is also defined .
However, on starting the server i am getting the following exception:
org.alfresco.error.AlfrescoRuntimeException: Ensure that the 'dir.root' property is pointing to the correct data location

I googled a bit and found the following link:
http://forums.alfresco.com/en/viewtopic.php?t=5845
I followed the steps outlined there, but the problem still persists.

One noticeable point is that if i change the store property impl in contentService bean to the original one, i.e. <ref bean="fileContentStore" />. The server
starts up normally and i didn't encounter any exception.

Any pointers on the same are highly appreciated.
9 years ago
Hi,

According to Sun Java Tutorial,

Use Iterator instead of the for-each construct when you need to:
Iterate over multiple collections in parallel.

Whats the benefit in case we go with the iterator?

Please provide your inputs on this..

Thanks,
Mohit.
11 years ago
Hi Everyone,

Can any body let me know about the links for XSLT,XPath questions or exercises
which i can use to test my knowledge.

Thanks
Mohit.
Hi,

I want to know what really is the idea behind using a marker interface as it doesn't contains any methods.

The name reveals that it kind of mark things , but why do i need an interface which which doesn't have methods.

Any comments/suggestions are most welcome.

Thanks in advance,
Mohit.
12 years ago
Hi,

Thanks for your reply , its captured correctly and is there in the list of options as well , i am using LabelValueBean for the options , i had spent quiet some time on this , but nothing really came to know.

I put print statements in getters and setters of state attribute , on the console i can see that my option is getting captured, yet its not appaaring as selected .

Any help will be most appreciated.
12 years ago
Hi,

I am facing a strange problem using html:select .
The select property refers to state drop-down . The state is an attribute of the Address bean and the address bean is in turn a part of the form bean.

So based on my requirements i have instances of addresses in my form-bean as
previousAddress,currentAddress etc.

The problem is that the selected state is not appearing as selected when i return to this page.

I am using html:select property="previousAddress.state". But when i use bean:write property="previousAddress.state" i am getting the name of my selected state.

Is this a bug in struts or am i missing something . The selection is captured and while rendering of the page the choice is not appearing as selected.
12 years ago
Hi,

Please provide the solution for the following problem :

on my page things should appear as:

Are you Married?
radio-button(Yes) radio-button(No).

So a married is a link which is defined as a href=# onmouseov=some content.

The problem is that "Are you married?" is read from the data-base.
I made a java-bean which contains the display property.

After fetching the display i edit it to show the link.

The anchor tag i am adding through my java-code to the display is interpreted with escape chars for less than, gretaer than & quotes so the entire anchor tag appaers on the screen
which is not wanted ?

Any help or suggestions are most welcome.

By the way , i had these placed these bean objects in a map and the map is a part of the form-bean.
I iterating through the map using the nested:iterate tag.

Thanks in advance.

Mohit.
12 years ago
Hi,

I still have some doubts like :

I follow what i do , calling a business method() on the bean instance , now the print statement in ejbCreate() may or may not be called , reason being it might have been called earlier . In case, its not called , then we will have the print statement on the console.


Now after servicing the method the bean goes back to the pool , now if the client again calls a business method on the same EJBObject stub it might be tied to another bean instance(different from the one obtained earlier) .

So we can never predict that the priont stmt in ejbCreate() will ever be called or not , it may or may not be .

What do you feel ?

Regards,
Mohit.
Some more points i like to add is that for stateless session bean , the object instances can be created any time , means its upto the container what it chosses . So during a create() call , there is no association with a object instance .

Thats where i start to get confused .....

Regards,
Mohit.
Hi,

I am a bit confused about the callback method ejbCreate() for a stateless session bean . When you call create() what you got is the EJBObject stub
which isn't tied to a particular bean instance , the bean comess out of the pool only when a business method is called .

My doubt is during this entire process when the container calls ejbCreate() ?


Am i missing something .

Thanks in advance.

Regards,
Mohit.
Hi,

I am trying to set tab-index property using a scriptlet variable(initialized at the beginning of the page) in my struts-html elements.
I don't want to hard-code as after time new elements can come in between & then i had to again set the tab-index for all of them.

I am getting the following error :
The method setTabindex(String) in the type BaseHandlerTag is not applicable for the arguments (int)

I am doing this :

int i =1; //initialized at the beginning of the page.
html:text property="aa" tabindex="<%=i++%>"
12 years ago
Hi,

I am SCJP , and what i feel that the knowledge gained during the process of
preparing these certs is what that matters.

Many a times, there are small tid-bits whcih one is un-aware of and came to know about them only while preparing .

I take these certs as a way of improving as well as augmenting my knowledge-base.

Mohit.
12 years ago
Hi,

Can anybody provide a link from where i can know about the new features of jdk1.5 as compared to jdk1.4.

I tried a search but couldn't found a link which provide all the info.

Any help will be most appreciated.

Thanks in advance,

Mohit Agarwal
SCJP(1.4)-90%