This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Mahima Singh

+ Follow
since May 16, 2007
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 Mahima Singh


Its a jar file and we use bat file to monitor the cosole output, for examples any the sysout and syserr.
the jar talks to a central reservation system and handle the travel operations like issuing of variuos travel documents.
We were initially running only 2 instances of the jar on the server but now we have to run around 100 of the same depending on a kind of code on travel enviroment.

We are not experiencing any problem currently but the idea to put in the app server is for better resource management and performance.
Not sure if the JBoss is the right option then..


12 years ago
hi! there,

I am visiting Javaranch after a long long time. Infact forgot both my passowrd and username. :|
Moved to .NET apps and got a small problem with a old app in java.
Javaranch has a lot of new changes since I last visted .. all good...

Ok.. now with the problem.

our firm has a java console app which runs as a bat file with absolutely no swing or any other front end stuff.
The app is running fine but because of performance enhancement we are thinking of moving it to an app server.
Is JBoss a good choice ? or do we have something else in java specifically for Desktop app. Or is the move not necessary at all.

We are busy doing it but one of the lib we using for xml procesing is not working with jboss so I am just wondering if the lib behave diffrently for JBoss.

Any feedback would e appreciated.
Thanks a lot

12 years ago

I have been working on .net framework lately. Now, I need to call a .net web services from java. I have never created/implemented a java web service.

Can you help me with what jar would i need ? & if i need to download some toolkit ?

I am currently trying : (using JAX-RPC)

but i am getting :

I think i am heading in wrong direction. Please help, there isn't much help on google for this.

Thanks & Regards
[ May 08, 2008: Message edited by: Mahima Singh ]
14 years ago
Thanks Paul & Arun.

I mustn't assume anything & better do some performance tests on prototypes.

Thanks again.
Thanks Paul,

Actually i am currently working on 2 swing application.

1st application : There would be only 1 user, just to upload some data(once in a month stuff). I do need to show the updated records but there is only one user so i don't think there is much possibilty of dirty data.

2nd application : Many user (more than 100) would be accessing the Database but i don't need to show them updated stuff. but with each session one connection is occupied so i fear to run out of maximum number of application connecting to DB.

What i understood is that i should keep one session for the first one as i need to read a lot of stuff from the database(it would be faster to have them in cache). For the second one i should close the session & reopen as even if users forgets to close the application, i don't run out of max. number of connections.

Please advise.

Thanks Arun.

Freshness of data doesn't matter much, as i just read a few arguments from database & do some xml stuff show result on screen & user submits the result in new table.
I am not using any mapping (one-to-one etc) as well. but the only concern is performance as in what makes application faster working in one session or closing the session & reopening it when required. Not only for 1 application instance but overall for all instances running in parallel.

I changed some settings in DB2 so now i am not restricted to only 30 conections so that problem is solved.

I am working on a small swing application with hibernate(DB2 as DB).
What is a better aproach of using session ? closing it after a transaction or retaining a single session through out the application. Currrently i am having a single session but i can only open 30 instances of the application at one time. Can it be a setting with DB2 or should i close the session after every transaction (or set of transactions)?

Please Help.
I too hit javaranch a lot, my favourite forum wud be ORM & meaningless.

as for news site : i hit

a lot. It has many indian news sites on 1 page.. & news gets refreshed in every few minutes.

14 years ago
here is one: its free as well,

i am using it.. its really nice
14 years ago
Akhilesh Trivedi

"Oh! I did not know, it could be that faster"

i like it..
14 years ago
Thanks for reply!!

I also tried identity but the same problem, so what i have done is :
I have set the Idenity Specification in DB table as no & i am using

<generator class="increment"/>

in my mapping file and its working fine.

But My problem is that one of the tables is shared between the two different applications and if i remove the identity on one will affect the other application. Though we are planning to move the other one on hibernate as well but i will have to do them together.

But in the mean time i will look for some alternatives. Please suggest some.


I am getting this exception when i try to use generator class = "native" for my id field in DataBase :

org.hibernate.exception.SQLGrammarException: could not insert: [com.test.TempXMLDAO]at org.hibernate.exception.SQLStateConverter.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.persister.entity.AbstractEntityPersister.insert(
at org.hibernate.persister.entity.AbstractEntityPersister.insert(
at org.hibernate.action.EntityIdentityInsertAction.execute(
at org.hibernate.engine.ActionQueue.execute(
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(
at org.hibernate.event.def.AbstractSaveEventListener.performSave(
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(
at org.hibernate.impl.SessionImpl.fireSave(
at com.test.TempXMLDAOManager.main(
Caused by: DEFAULT or NULL are not allowed as explicit identity Source)
at Source)
at Source)
at Source)
at Source)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(
... 17 more

MY mapping file is as follows:

<class name="com.test.TempXMLDAO" proxy="com.test.TempXMLDAO" table="TempXMLTable">
<id column="ID" name="id">
<generator class="native"/>
<property column="TempXMLRecord" name="tempXMLRecord"/>

If i remove identity from my ID column in database & use a normal ID in mapping then it works fine.
I have also tried generator class = "increment" but no luck.

please help.
Thanks in advance
found this link..

it seems like that big IT companies are also considering this option
14 years ago
hi! Kumaran..

just change the code from

m = m++; to


& run your code and 2 will be printed. Hopefully that will clear your confusion.

think of post increment as

m = m++;

as : the original value of m (1) is stored in a temp variable, value of m is incremented & then the temp value is assigned to m(L.H.S).
hence in the next line the value will be 1.

while in pre increment : m = ++m;
the value of m is incemented (to 2), store in a temp variable & then the value of temp is stored in m(L.H.S).

[ July 10, 2007: Message edited by: Mahima Singh ]
[ July 10, 2007: Message edited by: Mahima Singh ]
Interesting Methodologies..

just like to add 1 more..

Its All Crap(IAC).. finally evryone starts blaming the technology.. whether its Java/Microsoft.

14 years ago