xiao gao

Greenhorn
+ Follow
since Oct 11, 2001
Merit badge: grant badges
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 xiao gao

Hi
I use OC4J 903 and Jbuilder 8 with oc4j plugin to start a project.
At the begining, I write a very simple stateless session bean called HelloWorld which is its jndi name and create another client to call HelloWorld bean, but when I run the client to call session bean, it throws NameNotFoundException to tell me HelloWorld is not found. That is a quite a simple test and I am pretty sure everything in the package like ejb-jar.xml orion-ejb.xml etc.
Can anyone guide me what is the problem?
I test this simple app on my XP machine with OC4J based on JDK1.4.
My ear file is named info_eai.ear and my context env is
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL,"admin");
env.put(Context.SECURITY_CREDENTIALS,"123456");
env.put(Context.PROVIDER_URL, "ormi://localhost:23791/info_eai");
then I look up "HelloWorld" which is a jndi name, but fail again.
I notice no matter what version oracle 9i AS is , it doesn't have announced to support windows xp which is the os I am using now. I wonder whether windows xp cause the jndi lookup failuare(NameNotFoundException)?
I just do a quite simple hello world ejb which I played on weblogic/jboss tons of times without any problems, but sucks at oracle. Can anyone help me out ?
Thanks
19 years ago
Hi all
I have a question about oralce 9i AS 2 ...from otn I saw oracle claim its latest app server support the abstrac ejb, cmr and ejb ql which are the features for the ejb2, and I do find bunch of samples to demo it.
I wanna dose 9ias really support these features and who has implemented these features in projects?
Thanks
20 years ago
Hi all
I have a huge table with 100,000 rows data to query. I want to query data every 20 rows and I want to use SLSB for the DB query.
I have a data client called queryResult holding the the home proxy of that SLSB, each time it create a instance of that SLSB to perform the db query and get a collection of data from SLSB.
I want to know if my solution is acceptable which not occur too much performace penlty.
The other question is since I use SLSB for the db query, how I can query certain amount of data from db and pass to queryResult dat a client..I use Oracle 8.1.6 with JDBC 2.0/ JBoss 3. I find setFetchSize doesn't work at all.

Thanks
Hi all,
sorry for my borther, but I really wanna know the exact date that Oracle 9i release 2 for Linux releases?

Thanks
xiao
20 years ago
These daysI install the RedHat 7.2 and setup the samba succesfully...windows clients can find and access the samba folder to take file operation.
My question is how to make Linux access the Windows share folder or access samba servers of other linux machines?
20 years ago
Can anyone tell me what is the differencd in putting the start script of an application like resin which is httpd.sh in rc.local or rc5.d or rc3.d to boot the application?
Any security or performance different?
20 years ago
Make sure you have the right to upload the assignment, I get such problem and sun solve it in a week. It is really annoying.
Hi all
I have download my assignment as October 16 and try to upload my assignment yesterday. Everything seems ok when I login the www.galton.com/~sun , but when I try to upload my assignment, the web tells me that I have no rights to upload my assignment. I can download the assignment but have no rights to upload, Can anyone tell me what happen on my uploading and why I have no rights?
Thanks
Hi, Mark,
I am fully clear now, thanks you great explaination.
!!!
Hi Mark,
Thanks for the reply, You are right.
But in my case, I register a RemoteData obejct to the RMI registry, and wrap the Data object inside of RemoteData. In the RemoteData, I keep a singlton Data object and the isDatabaseLocked is a static member level variable. So I think only one isDatabaselock available during the Data instance life time.
Any client will only get the same isDatabaseLocked varaible in my occasion,
Does my words make sense?
Reagrds
Hi Mark,
You see, I have a boolean variable called isDatabaseLocked, if the record is -1, I will set that variable true, each time, a thread calls lock method, it will check this boolean variable first, then check if record number is in the locks collection. I think I use another approach to solve the whole databse lock, am I right?
Regards
I have three method private Set getlocks()
public void lock(int record) throws IOException
public void unlock(int record) to make record locking.
I also add two variable, locks which is set object and isDatabaseLocked which is a Boolean value.
I use a HashSet object called locks to keep the record numbers. If one thread calls the lock(int record) method, it first looks up the locks object to find out if there is the same record in the locks collection. If there is no the same record number in the locks object, this thread puts the record number into the locks object, then this thread will do some operation on this record in the database. After database operation, this thread calls unlock(int record) to remove the record number from the locks and calls getLocks().notifyall() to notify all the other threads waiting for modifying records.
If one thread finds the same record number in the locks, it called getLocks().wait() to wait until be notified by another thread which removes the record number from the locks object.
The reason I use HashSet to contain the record number is that HashSet only allows unique object and provide a good performance on internal searching. That is what I want for the locks object. Since I need a thread-safe locks object , I use getLocks() method to return a thread-safe locks object.
According to the requirement, while record number is �C1, the whole database will be locked. I implement this feature in lock(int record) method.
If the record is ��-1��, it makes isDatabaseLocked to true. Each time, one thread looks up the locks object, it first check isDatabaseLocked value, if it is ture, this thread called getLocks().wait() immediately. If isDatabaseLocked is false, this thread takes another check on locks object to find out if the same record number is in the locks object.

Any advice?
Regards
Hi mark,
Thanks for the reply but I still don't quite understand your word "For the lock entire database, try recursion in the first part of your if statement. You will need to loop through all the record in the database." Can you explain it to me detailly?
Thanks
Hi all,
I have no idea about the argument = -1 in the lock method. What "the entire database shoudl be locked" means? How to implement the whole data locked. I means what the purpose of the whole database locked? If lock(-1) and lock the whole database successfully, when and how to unlock the whole database?
I have code like this :
if (record == -1) {
isDatabaseLocked = true;
} else {
synchronized(getlocks()) {
while(isDatabaseLocked | | getlocks().contains(record)) {
try {
locks.wait();
} catch (InterruptedException e) {
throw new IOException("lock failed ");
}
}
getlocks().add(new Integer(record));
}
}
private Set getlocks() {
if(locks == null) {
locks = Collections.synchronizedSet(new HashSet());
}
return locks;
}
does my code make sense?
Regards
Hi, All
I am just writing the user document and programmer note, I want to know whether I can put all the class file into one jar file and include this file when I run server and client.
I find lots of people here use two jar files one is for server, the other is for client. It is ok but where I put the stub class. It seems I have to put stub class both in server and client jar file. Is it too much redundency?
Need I create skeleton and stub for my application compatiable to both jdk1.1.* and java 2 or just use only one stub class used in java 2?
Any advice?