Ramya Chowdary

Ranch Hand
+ Follow
since Sep 27, 2006
Merit badge: grant badges
For More
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 Ramya Chowdary

The StampedLock creates a queue (linked-list) of the threads that are waiting to acquire the lock.
The insertion in the queue is Lock-Free, but after the insertion, each thread will spin or yield and thus be blocked by the thread currently holding the lock. Using the Unsafe.park()/unpark() mechanism, the thread that releases the lock is able to "wakeup" the next thread waiting in the queue, thus enforcing a strict priority.

The current thread is guaranteed to eventually get the lock, and thus complete its own operation.So, Eventually all thread complete their operation.
9 years ago
If it is not the suitable forum, Can this be moved to somewhere else ?
10 years ago
In Application Programming, You need to concentrate on the business logic.
Common things like, Memory References, and Memory management can be put out of developer hand.

But, On the other hand,
Operating system does lot of complex things, which are not feasible to write them in Java.
Even, Most of the Runtime's like JVM, or GC of OS X needs to be written in C.
10 years ago
Let me know if the question is obscure or require more info.
10 years ago
One of the good thing about the Node.JS is, it never idles ( in a single thread too).
For ex: If you're fetching a Url content, Node.JS actually doesn't block on it. It goes on with other execution.
And once the content is fetched, your callback will be invoked.
The good thing is,There is no explicit context switching from the OS as it runs within the VM ( V8 engine).

Is there away to achieve this kind of functionality in Java.
The whole purpose is not to use thread, which causes context switching and synchronization cost.
I've following use case, which I think can benefit from this,

There is a Java service ( more like a Facade) and which internally calls other independent remote services and accumulates the data.
It is actually blocks on the response of each service, so the total response is cumulative rather than the highest blocking response of a service.

10 years ago
It is not possible to run the linux Java using Cygwin.
10 years ago
Thanks for your alternative solutions.
I do consider your suggestion about the JVM.

If you don't have the resources to get a dedicated Linux box, get a VM.

It is more because of IT Polices, enforcement of Group polices on linux.

Oracle Virtual Box is free and has some pre-built development stacks that might help you get started.

Thanks for the suggestion, But not sure of virtual box for day to day usage in development.

Can you/anyone look at java.io.File customization, that should not be much of impact.
10 years ago
It is an existing application with hundreds of configurations files with hard coded paths.
I got no say in converting this paths to relative paths, or using a Linux Desktop OS like ubuntu for development.

So, For development, the practice is write the code in windows using IDE, and build it.
deploy it in linux and validate what you wrote.

So, To increase productivity, I can only see this approach.

10 years ago
We've this existing application in which all the paths are absolute Linux paths ( like /home/pratap/conf )
I want to run this app on windows without changing those paths. So I would be copying all the files in a directory assigned on my windows machine.

For Ex:
/home/pratap/conf --> D:/linuxmapping/conf

/home/pratap/logs --> D:/linuxmapping/logs

/home/pratap/conf/springfiles --> D:/linuxmapping/conf/springfiles

Is this work done before ?

I've looked into JDK and JVM Source, and figured out that, java.io.File class uses Native FileSystem.
So, I can change the FileSystem C++ source of JVM, but that needs re-building the openJDK.

But, I've figured out that java.io.File ( Other classes like FileInputStream uses File) can be changed and repacked into their jar.
This is far easier, but I am not sure What're the other places that I need to change too.

10 years ago
I want to find the root Type of the XSD ( You know the root node of the corresponding XML, But I don't have it's XML, just XSD)
I need to identify the root type, The normal XML ( XSD also a type of XML) doesn't work simply because you can write same XSD in different ways.

I tried XSOM, Apache XMLBeans ( There is a bug in programatically loading the xsd in it) and http://ws.apache.org/commons/xmlschema20/
But, nothing seems to work for above.

It is not that it cannot be done, But I don't want to reinvent this wheel.
Any help would be highly appreciated.

Application Server says, Injection failed JNDI not Found

EDIT: Will let you the exact error, Once I get hold of this app

I am trying to inject connection factory or TopicConnectionFactory into EJB with following code,

I am trying to inject connection factory or TopicConnectionFactory into EJB with following code,

But it is failing to inject that,

While at the same time, in EJB @PostConstruct method, I can do following and it is working fine

Any Help with this ?

EDIT: I am using Websphere 7.0 Application server
What about the questions, that are not getting answered even for 3-4 days ( Of course, period defined on level of urgency)?

Is there a way to address this problem somehow ?

11 years ago