jay akhawri

Ranch Hand
+ Follow
since Nov 28, 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 jay akhawri

if you do what Ulf suggested it would run fine in all JVMs 1.3 and up, the newer versions are always backward compatible.



Ernest Friedman-Hill wrote:Write only to the earliest API level you need to support, and you're done.




Thank you all for the help . Indeed this make sense. Though, I may have to do away with the nice features which requires a minimum JVM version(to give some users the best possible version of the app who can afford better JVM version and yet provide a minmum version to those having lower JVM version.)


~Jay
9 years ago
Thank you Marco and Ulf for the hints.

Marco Ehrentreich wrote:
Would you like to write and maintain different versions of your application for every possible Java version?



I was thinking in the same direction. However, there are few bottlenecks. The current plan is to Bundle JITTed code (for the various runtimes) with C++ App launcher and run the appropriate version of it.

Bottlenecks
----------------

1. I may add a repository of the JITTED code for the various runtimes. (Currently I am targetting Windows/x86 platform) however, even if I do so I should know what is the default JVM version the user is running.

I tried to build a C++ dll which can use JNI_GetCreatedJavaVMs to get the default JVM but I am not successfull. It always returns Zero.




2. If I get pass this hurdle, i might need to find how to emit the JITTed code to execute in target JVM.Which I don't know how.

Am I going in right direction?

~Jay
9 years ago
Hi,

I am working to build a small (launcher based) JDBC tool which users will be running on different JVM ranging from 1.3 to latest.

following are the major issues:
1. JVM is not known at the runtime.
2. Users should not be needed to re-compile the code based on the JVM runtime.

I am looking for a best practice and/or implementation sample which can cover this. I am also looking for a documentation on a launcher application which does all the precheck to successfully launce the application.

In short, I want to make sure that at any cost the application is launched successfully.

thanks

~Jay


9 years ago
Hi All,

I am trying to build an application which can enumerate MS SQL Servers in a LAN. There are few approaches in ODBC, and .Net which lets you do it. Such as SQLBrowseConnect (an ODBC API) and SMO, DMO etc.

however, i want to build such functionality without extensively spending my time through JNI --> ODBC/SMO(.Net)/DMO(COM) approach.

What could be other approaches?
Are there any impementation?

Regards,

~ Jay

Thanks for your help. Both p6spy and jmonapi are great APIs.

- Jay
Hi All,

I am trying to build/get a tracing tool which can trace the low level API calls of the JDBC drivers (targeting SQL JDBC driver). Something in the line of ODBC tracing.

I will appriciate your views on this.

- Jay
Appriciate your response.

And there are many!!!

- Jay
10 years ago
Hi Everybody,

I guess my question is really "How to consume the COM components". I am confident that IDL will bail it out.

Perhaps, if you can suggest me how?

- Jay
10 years ago
Hi all,

I don't know how to use SQL_DEFAULT_PARAM into a stored procedure.
I will appriciate your help.

jay
Sorry I forgot to put environment

SQL server 2000 STD and sql server 2005 Std
OS: Windows server 2003
Hi all,

I have a question regading usage of deafult output parametrs in JDBC.
The problem is I am not getting default values as a return of Stored procedure..this is returning NULL.

For example we create a procedure as follows:

CREATE procedure B999EDASOL28XX_SPR25
(
@nch nchar(10) = 'Mars ' OUTPUT ,
@nvc nvarchar(30) = 'Moon ' OUTPUT ,
@ntx ntext = 'Mars lower left of waning crescent Moon.' OUTPUT
)
as
declare @var sql_variant;
set @var = 'qwert12345'
set @var = 12345
select @nch
select @nvc
select @ntx
set @nch = 'Mercury' ;
set @nvc = 'Mercury will have a poor evening appearance in Sept-Oct. '
return (convert(char(20), @var) )
return (convert(int, @var) )


Each of the 3 input/output parameters have a default value
defined in the procedure. When we call the procedure via JDBC, we
prepare and execute the following :

{?=call B999EDASOL28XX_SPR25(?,?,?)}

We do not supply values for any of the input/output parameters,
but SQL Server interprets this as passing NULL instead of using
default value. The result is that all output parameter values are
passed as NULL instead of passing the default value.


I will apriciate your help.

Thanks


Jay
Hello everybody,

Hey, I have got this issue regarding clustering Tomcat and IIS. I would like someone to help me if "He's been there done that."

Regarding initial information I hooked myself to onjava.com ... and used
This Article - >
"Configuring Tomcat and Apache With JK 1.2
by James Goodwill
11/20/2002"

It never worked as it is for IIS4 and he hasn't mentioned anything about Creating Filter dll entry in register.


I found another way around in
----
http://tomcat.apache.org/connectors-doc/howto/iis.html

----

In short i followed what is given blindly but failed miserably.

i used follwing version (1.2.15)of isapi_redirect.dll from

-----
[URL=
http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.15/]
[/url]
-----

Using isapi_redirec.msi....i added the regitery entries as it was given.


my tomcat is listening on 8080. and IIs is working fine but i am getting following messages on Tomcat startup console.



Mar 4, 2006 8:21:01 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoi
nt.java:264)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:137)

at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.
java:1429)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:609)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:2384)
at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)
Mar 4, 2006 8:21:01 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindExcept
ion: Address already in use: JVM_Bind:8080
at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.
java:1431)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:609)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:2384)
at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)
Mar 4, 2006 8:21:01 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2203 ms
Mar 4, 2006 8:21:01 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 4, 2006 8:21:01 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Mar 4, 2006 8:21:01 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 4, 2006 8:21:01 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Mar 4, 2006 8:21:01 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:F:\Program Files\Apache Sof
tware Foundation\Tomcat 5.0\conf\Catalina\localhost\admin.xml
Mar 4, 2006 8:21:05 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
e
Mar 4, 2006 8:21:05 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
l=true
Mar 4, 2006 8:21:06 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur
nNull=true
Mar 4, 2006 8:21:29 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:F:\Program Files\Apache Sof
tware Foundation\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
Mar 4, 2006 8:21:39 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:F:\Program Files\Apache Sof
tware Foundation\Tomcat 5.0\conf\Catalina\localhost\manager.xml
Mar 4, 2006 8:21:39 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /jsp-examples from URL file:F:\
Program Files\Apache Software Foundation\Tomcat 5.0\webapps\jsp-examples
Mar 4, 2006 8:21:40 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path from URL file:F:\Program Files
\Apache Software Foundation\Tomcat 5.0\webapps\ROOT
Mar 4, 2006 8:21:40 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /servlets-examples from URL fil
e:F:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\servlets-exampl
es
Mar 4, 2006 8:21:40 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /tomcat-docs from URL file:F:\P
rogram Files\Apache Software Foundation\Tomcat 5.0\webapps\tomcat-docs
Mar 4, 2006 8:21:40 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webdav from URL file:F:\Progra
m Files\Apache Software Foundation\Tomcat 5.0\webapps\webdav
Mar 4, 2006 8:21:40 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 4, 2006 8:21:41 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 4, 2006 8:21:41 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=47/187 config=F:\Program Files\Apache Software Found
ation\Tomcat 5.0\conf\jk2.properties
Mar 4, 2006 8:21:41 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 40297 ms



Expecting a quick response object!!!

Jay
12 years ago
HI all,

I am writing sample JMF applets...which is quite easy anyway.i have already made an applet for RTP stream Play.

WHat i am trying to do next is to include Java Telephoney API and JMF togather to make a call capturing program.

I have no idea of the later technology and i would defenetly appriciate a helping hand from someone who have worked in Java Telephony API before .

I will appriciate if you will share some valuable insight with me.

Thankyou
Jay
12 years ago
Hi Mr. Hill,

sorry for naming u wrong ..i had in mind that u wrote that book and i wrote that in mistake..i hope you wont mind.

Another of my doubts is that in the case discussed above envolves static linking...but if it were a dynamic linking ..wud compiler had to initialize all classes in VM, even if a subclass entity re-refers an already referred entity by superclass. what wud be flow of execution in that condition?

Have a nice day
- Jay
13 years ago
Hi jess,

okey that make sense...but when classloader loads the Test.class in the VM , does it not also load the symbol table? and all the symbols are put in the symbol table at load time?.....does this mean the Linking process only take cares of such situations.....does that also mean Initialization only occures when Linking is done completly.....but what will be the case with Dynamic initialization?

Thanx
- Jay
13 years ago