Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

prasad kulkarni

Ranch Hand
+ Follow
since Mar 19, 2006
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 prasad kulkarni

I have lot of select queries to integrate with my java code.

I have two options to select within :

1. Store procedure which returns cursor
2. Prepared statements

Which one should I use ? Which one is the fastest and a correct approach?

Can java experts please put some pros and cons of both approaches?
try increasing java heap size. That's the only option.

I am also facing heap size problem with drool - not with loading rule file, but with executing/firing it.
11 years ago
Thanks very much.

This is exactly I was looking for.
11 years ago
Hi to ALL,

I have a work flow in java code which performs some transactions against a database.
Now I want to put some conditional logic inside this work flow, however my problem is these conditions are not yet finalized & also the processing logic related to every condition.

How can I externalize the conditions & their logic? May be there will be any other alternative other than externalizing the logic.

What I want to achieve is that - I do not want to touch my basic wokflow ( except once or twice ). Every time there is new condition with its processing logic, I don't want to change my java code & don't want to do a whole deployment. I want to achieve all this conditional processing without touching the core java code & with very little/minimal changes.

Any clue - how to achieve this ?

Thanks,
Prasad
11 years ago
Hi,

I am using Hibernate with version:3.2.6 .

I have a database table EMP_TABLE like :
EMP_ID | KEY | VALUE
100 | EMP_NAME | John Scott
100 | CITY | NEW YORK
100 | COUNTRY | USA
240 | EMP_NAME | Shane Watt
240 | COUNTRY | CAN
300 | COUNTRY | USA

How should I write hibernate mappings for this table so that I can get the employee details & also save/update it, using following class ?


Mapping :

Any kind of clue, help is appreciated.
I want to show the wording "UNITED SEP      030 WORD" as a hyperlink. However , when I do that like this -
<a href="javascript:showSymbolMenu('4')>UNITED SEP      030 WORD</a>
, browser displays the value "UNITED SEP 030 WORD" with hyperlink. The spaces present in between "SEP" & "030" are truncated.

There are million of records so I can not substitute empty spaces by &nbsp;.
How should I stop browser from truncating the spaces?
[ November 02, 2008: Message edited by: prasad kulkarni ]
yeah thanks, I did that & it worked. I have added following in the mapping file. Note that <id ...> tag is IMP otherwise , it will not work.(I faced same exception w/o this tag.)
I am trying to call the stored proc through hibernate (& spring), but getting the following exception. Surprisingly , if I use another class present in the same package , it is working.(There are exceptions as the mappings are not related to the another class, but the class is recognized by the hibernate.) Can anybody help me to get out of this? Why the class is not recognized by hibernate?(I am using hibernate 3). I have tried with fully qualified name as well as only class name, but no luck.




Here is my xml file code:


My java class is as :
[code]
package com.domain;

import java.util.Date;


public class SrUserReportResultData {

......java class with the attributes & getters-setters
}
[/class]
Hi,

For a new project, I have to decide whether I should go with the ActiveMQ (or any other message broker ) or not.
My need is :
I have 2 secured & different networks. A machine in one n/w can SFTP to the other machine of other n/w.
I have a choice to use files for communication using SFTP . However I want to go for JMS. I do not think file handling as a robust way to achieve my task.
I want to know,
1] Can I use - only one broker instance in one network and the processes running on other network will subscribe to the queues of this only one broker instance?
2] Is there specific protocol I have to use?
3] Do I have to check/edit any specific setting (as port or protocol) from the network administration team?
I have lo4j.properties in my classpath , which due to some other reasons, I do not want to touch.
The log file is given in the lo4j.properties file as :
log4j.appender.FILE.File=C:/Logs/test.log

However , when I am executing some other java classes, I want to specify only the different log file w/o touching the exisitng settings in log4j.properties.

How can I do that?

I tried to do something like this :
java -Dlog4j.appender.FILE.File=C:/newtest.log com.Start

However it is not working. Is there any other alternative?
I have a project with the 2 java classes having main method.
These 2 classes are to be executed for 2 different purposes on the same machine at same time in different java process.
These process share the same log4j.properties file as :

[code]
log4j.rootCategory=DEBUG,FILE, FILE2

log4j.appender.FILE=org.apache.log4j.RollingFileAppender
log4j.appender.FILE.MaxFileSize=5MB
log4j.appender.FILE.MaxBackupIndex=50
log4j.appender.FILE.File=C:/Logs/Log1.log
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d{dd MMM yyyy HH.mm.ss.SSS} : %c : %m %n

log4j.appender.FILE2=org.apache.log4j.RollingFileAppender
log4j.appender.FILE2.MaxFileSize=5MB
log4j.appender.FILE2.MaxBackupIndex=50
log4j.appender.FILE2.File=C:/Logs/Log2.log
log4j.appender.FILE2.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE2.layout.ConversionPattern=%d{dd MMM yyyy HH.mm.ss.SSS} : %c : %m %n
[/code/

However , when I executed one java class, it is logging to both the log files as Log1 & Log2.
How should I configure this in java code, so that 1st java class/process will log to Log1.log and 2nd to Log2.log?
We can add mapping in the hibernate.cfg.xml as

<!-- mapping files -->
<mapping resource="org/hibernate/auction/Item.hbm.xml"/>

However I am using hibernate.properties and not the cfg.xml. If I want to add the same mapping in the properties file , how can I do that?
(I do not want to do that using new Configuration().addResource("Item.hbm.xml") method ).

Help please !
I have a form which has one dropDown. There are 2 table-rows ( i.e. <tr> >
which I am loading on the change of drop down value.
After selecting the value '1' in drop down , the CASE_ONE tr is loaded, and when I hit the ENTER key, the form is submitted. This is perfectly fine.

Now when I selects the value '2' from dropdown, tr CASE_TWO is loaded and at this time, if I hit the ENTER key , the form is not getting submitted.

If I alter the positions of the trs CASE_ONE and CASE_TWO, the tr, placed earlier in the code works fine after hitting the ENTER key, but the other tr does not work properly.

Here is my code. Please help me to get out of this.

[ February 15, 2008: Message edited by: prasad kulkarni ]
ok I solved this by using scp command of ant.

<scp file="${workspace.deploy.dir}/${app.name}.ear" todir="weblogic:weblogic@myserver:/opt/bea/weblogic92/user_projects/mydoman/upload"
port="22" trust="true"/>

Note : Do not forget to set property -> trust="true"

Also you need one external jar to be included in the ANT classpath.
Name of the jar is -> jsch-0.1.37.jar
12 years ago