Win a copy of Head First Android this week in the Android forum!

K Gupta

Ranch Hand
+ Follow
since Aug 31, 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 K Gupta

Thanks Tim and Jeanne for your reply,

So can I use subeclipse for Tortoise SVN also.

Thanks & Regards,
Kshitij Gupta
Hi,

I have just begun using tortoise svn and installed eclipse plugin for me. Can anyone guide me about the values that should go in Preference page dialog box ? I especially
have question about svn server and shared folder field?

Thanks & regards,
Kshitij Gupta
Thanks Adam for your explanation.

So if I want a same task to run concurrently, should I resubmit it as many times as the size of pool ?


Thanks & Regards,
Kshitij Gupta
Thanks Adam,

But I still don't get the need for a thread pool. If initiation of task depends upon the completion of ongoing task, then only one thread is suffice for this activity. then what is the significance of thread pool that ScheduledThreadPoolExecutor owns ?


Thanks & Regards,
Kshitij Gupta
Hi,

I have used ScheduledThreadPoolExecutor in following example


Now this is what javadocs says about ScheduledThreadPoolExecutor


[javadoc]public ScheduledFuture<?> scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)Description copied from interface: ScheduledExecutorService
Creates and executes a periodic action that becomes enabled first after the given initial delay, and subsequently with the given period; that is executions will commence after initialDelay then initialDelay+period, then initialDelay + 2 * period, and so on. If any execution of the task encounters an exception, subsequent executions are suppressed. Otherwise, the task will only terminate via cancellation or termination of the executor.

Specified by:
scheduleAtFixedRate in interface ScheduledExecutorService
Parameters:
command - the task to execute.
initialDelay - the time to delay first execution.
period - the period between successive executions.
unit - the time unit of the initialDelay and period parameters
Returns:
a Future representing pending completion of the task, and whose get() method will throw an exception upon cancellation.[/javadoc]


So according to javadocs for every millisecond a thread should be invoked and increment the count and then go for sleep.

But this is what I get in console:


5
1265023803311 pool-1-thread-1 ---> 1
1265023813311 pool-1-thread-1 ---> 2
1265023823311 pool-1-thread-1 ---> 3
1265023833311 pool-1-thread-1 ---> 4
1265023843311 pool-1-thread-1 ---> 5



My question is why another thread in the pool is not getting started. As you can see from time diference , I have to wait for thread 1 to be completed, then only the task is done again ? My expectation given the delay in sleep all 5 threads would be getting started.
Please suggest me if I am correct and how to get second thread started ?


Thanks,
Kshitij Gupta



Hi,

Does anyone has any suggestion. I am stuck till now



Thanks.
Kshitij
12 years ago
Hi Cameron,

I am using iiop//:machine_name:<ORB port> to do the lookup. I am sure that port is right because if I run the deploy the same application with same setting on another machine I am able to do the look up. It just fail when the lookup is in same machine. Also the class that does the look up is in WAS_HOME/lib/ext folder which is shared by both the profiles. Can this be the problem ?


Thanks,
Kshitij Gupta
12 years ago
Hi,

I have two profiles in my machine and in one profile I have deployed an EJB which can be looked up from a POJO in another profile. But the profile from which I am doing the lookup ends up doing the lookup in its own node. If I deploy this two application in two different machine I can perform the lookup. Some one has told me that creating a virtual machine name in WAS will help but I don't know how to use it.Can someone please help how can I resolve this issue ?

Thanks,
Kshitij Gupta













12 years ago
Hi,

I don't know if anyone has faced the issue. I am not able to perform JNDI lookup from another remote server if the remote server is deployed on UNIX. Everything works fine for windows. Can anyone tell me where I am going wrong ?

Thanks,
Kshitij
12 years ago
Hi,

I have a EJB deployed in WAS server which I am trying to call from a POJO code running in another instance of WAS server. For security I have same custom registry in both the servers and have created and synchronized LTPA keys in both the servers. But when I try to find the JNDI context I am getting com.ibm.websphere.security.auth.WSLoginFailedException . I am right now sending the username/password of the profile in the security principal and security credentials. Can anyone please help me in this as its very urgent and I am not able to find anyway to solve this.
12 years ago
Hi,

Can someone please tell me which jars to include.


Thanks & Regards,
Kshitij
12 years ago
Hi,

I have EJB deployed on Websphere 7.0 and have written a client to test it. But when I am running the client code I am getting error. Please find below the code of the client:

props.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(Context.PROVIDER_URL,"iiop://localhost:9100");//ORB listner port is 9100
Context ctx = new InitialContext(props);
Object obj = ctx.lookup("MyEJBService");
RemoteHome obj1 = (RemoteHome)PortableRemoteObject.narrow(obj,RemoteHome.class);
Remote obj2 = obj1.create();


I am getting following error:

javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl cannot be cast to com.ibm.CORBA.iiop.ORB]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:318)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:400)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:712)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.amdocs.iadmin.user.TestEJb.testUserLoad(TestEJb.java:49)
at com.amdocs.iadmin.user.TestEJb.main(TestEJb.java:27)
Caused by: java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl cannot be cast to com.ibm.CORBA.iiop.ORB
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:86)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:309)
... 7 more


Can someone please help me regarding this.


12 years ago
Hi,

I am migrating a site containing cgi pages. *.dlls and static web pages to Weblogic Server 10.3. Can anyone please guide me what are the steps to perform it ?


Thanks in advance
12 years ago
Thanks for your response Jesus.

Bagwan is it always bad to have CAPM on one's resume. I'll tell you my profile and please advice me if I should go forward with this certification or not .
I have more than 3.5 years of experience and I have SCJP, SCWCD , SCBCD & SCJWSD . I am senior member in my team. And down the path I want to go towards management side. Should I proceed with CAPM ?
Jesus

I am also planning to give CAPM. Do you have any idea how much time it will take for preperation ? apart from PMBOK is any other book required ?