Manzar Zaidi

Ranch Hand
+ Follow
since Oct 21, 2004
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 Manzar Zaidi

PageContext implementations are provided by the servers. Looking at the PageContextImpl from apache, I see it maintains the request as a member variable, so any changed to the request made via PageContext happens to the actual object suppiled at initialisation.
16 years ago
JSP
I dont see any problems with the code, it is doing what you rote it for,
When you write
If the attribute paramName is not set, it returns null.

Then if you set that back as a request attribute you get null on subsequent calls.


So that
Will return null.
16 years ago
JSP
Old and expired, edited to delete.
[ December 25, 2008: Message edited by: Manzar Zaidi ]
16 years ago
I am sorry, I think I did not communicate well enough.
The code I posted is the code that produces the issue. I have a JUnit class testing this piece out, but thats too domain specific to make any point here.
I hoped to get any 'I have seen it'/'You are doing that things again' kind of comments before I actually Isolated a test for what appears to be the issue.
I think I will be back with the isolated test soon. Have a good day ahead.
[ November 15, 2006: Message edited by: Manzar Zaidi ]
Thanks for your reply Paul.
no, this is not even the test case.
but I do nothing at all other than what I have there.
I set a date value in an object property mapped to a SQL Server Datetime column and save the object.
I realize that if you guys have not observed this anywhere else and dont see any obvious mistake I might be doing, I have to explicitly test this thing and check the possibility of a bug in Hibernate/JDK5/jtds driver.
Thats something I will do as soon as I get to my workstation tomorrow.
I find it happening randomly and much more often than not.
I have a simple Hibernate mapped object that has a util.Date as one of the properties.
I set this Date whenever I create the object and then just persist it using Hibernate.
The target property in the SQL Server 2000 DB is of type datetime. After the inserts, I can compare the inserted values from my logs to find that hibernate in general add 2 millisecond to every date it inserts!!
I do not find any related posting on the net so far.

The piece of relevant code is :



With this code, some values I could observe where like this :

  • utilTime =1163605588780 persistedTime=1163605588780
  • utilTime =1163605624045 persistedTime=1163605624047
  • utilTime =1163605651029 persistedTime=1163605651030
  • utilTime =1163605675544 persistedTime=1163605675543
  • utilTime =1163605703216 persistedTime=1163605703217
  • utilTime =1163605731418 persistedTime=1163605731417




  • I find the bartenders around here are quite seasoned to point out anything I might be doing wrong, before I finally signup for Hibernate forums and post this as bug there.
    Thanks for giving it a look and hopefully thought too.
    Thanks for the guidance Ganesh. The time calculator does have great pointers about the kind of knowledge I need to gather in the coming couple of months.
    Welcome to JavaRanch Ganesan,

    Does SCEA Exam EPractize Labs feature the sample questions taken from any braindumps ?

    How close can I expect the 6 sample assignments to be with the real one I might get on the exam?

    I have never worked with JEE business components.
    Would you recommend me to get familiar with all JEE concepts before buying this product for good results ? or your product can make good my lack of experience and still let me learn what I need for the certification ?
    I could add additional parameters to a request forwarding it through a jsp and using jsp:forward actions which let you embed jsp:param inside them, thus adding more actual request parameters to the request.
    17 years ago
    JSP
    thanks for the guidance Jeanne.
    I had ant in mind to help datasource creation from the installer I need to make. I saw the jacl/jython scripts but hoped that ant would be a simpler solution.
    Could you please point me to a location where there are more samples of these scripts ? The redbooks datasource example doesnt separate the logic clearly and left me very confused.
    17 years ago
    I need to automate the creation of JDBC datasource need by my webapp before I can use wsdeploy to deploy the app on a WAS6 server.
    All I can find about JDBC DS creation on redbooks and otherwise are samples about Jython scripts and manual config.

    Could you please help me find out some sample code on how can we create JDBC datasources using ant and then subsequently deploy the webapp to WAS6.
    Links to any tutorials even touching the topic of JDBC DS on WAS with ant would be very helpful.
    17 years ago

    Originally posted by Jeff Albrechtsen:
    I have a side question: why do they put them all in *one* type (be it class or interface)? Do they do this even if the constants, for the sake of example, fall into two logical, but completely unrelated groups?


    One reason would be to centralise all defined costants. At my company they classify different types by naming styles.
    It works well for about 30 constants, but yes, I would also go for different classes based on some classification if the number of contants gets large.
    [ January 17, 2006: Message edited by: Manzar Zaidi ]
    18 years ago
    At my company we follow this practice of defining all constants in one class.

    something like :

    public interface MyConstants {
    public static final String CONST1="Some value";
    public static final int CONST2=456;
    }

    Nobody here knows why they prefer to use an interface for this and not a Class maybe with a private constructor.
    I have seen atleast one book advocating against such use of interfaces, saying that interfaces are just meant to define types.

    I dont want to just do whats followed without understanding why.
    From your experience, could you tell me pros and cons for using interface vs. class for such a file?
    18 years ago
    Hello,

    I am trying to setup cruise control ver 2.2 to checkout project from CVS but..

    I get this error from CruiseControl as it tries to check for updates in CVS

    VSBootstrapper- Error executing CVS update command
    java.io.IOException: CreateProcess: cvs -d server:myusername@mycvshost:/dis
    k1/cvsroot update -dP module/subdir/trunk/build.xml error=2

    The config.xml file I am using is Config.xml

    I saw very helpful and simple tutorials online, but all of them say about suing the checked out project form the local folders. I would need the automation script to check the CVS and checkout fresh if needed.
    My Cruise control setup is working fine with local project folder.

    Any help and suggestions are welcome.
    18 years ago
    I am using commons FileUpload to do this.
    18 years ago
    JSP