Abhra Kar

Ranch Hand
+ Follow
since May 22, 2008
Kolkata
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abhra Kar

Thanks a lot Tim, please provide the link posted in spring community so I can follow up.
Regards,
Abhra
7 months ago
Hi ,
          In my project @RolesAllowed is used as @RolesAllowed({ "EMPLOYEE }) for methods.But those methods also can be used with higher privilege roles like ADMIN, HR. In an enum roles are declared as ---



It's a web project and sping core is used here.
What can be the possible ways these roles are applied internally for those methods?
Thanks
7 months ago
Thanks a lot Rob for the explanation.
1 year ago
Hi I need to access a private method String getFoo(X509Certificate cert) of A.java in junit testing in my project ,I have written the code like this –


I am getting an error when running ant test

C:\Ajava:22: warning: [rawtypes] found raw type: Class
   [javac]             Class[] paramVal = new Class[1];
   [javac]             ^
   [javac]   missing type arguments for generic class Class<T>
   [javac]   where T is a type-variable:
   [javac]     T extends Object declared in class Class
   [javac] C:\A.java:22: warning: [rawtypes] found raw type: Class
   [javac]             Class[] paramVal= new Class[1];
   [javac]                                     ^
   [javac]   missing type arguments for generic class Class<T>
   [javac]   where T is a type-variable:
   [javac]     T extends Object declared in class Class
   [javac] error: warnings found and -Werror specified
   [javac] 1 error
   [javac] 2 warnings

What will be the solution for this?
Thanks
1 year ago
Thanks a lot Matt for the clarification
1 year ago
I removed Thread.sleep(Integer.MAX_VALUE); and related interrupt call.It prints fine.But the same questions remain same--

Question 1> Why Thread.sleep(1000L) is required at line 13?If we don't mention this then in the execution I can see only Even Thread print 20 in eclipse output, nothing else.Why this is happening?
Question 2> After completion of printing 1 to 20 properly how I should stop the execution of the program?



1 year ago
Hi,
    I am brushing my thread knowledge.I tried to print even odd numbers using interrupt() method.I took reference from internet and wrote the below code--
<br /> <br /> Question 1> Why Thread.sleep(1000L) is required at line 15?If we don't mention this then in the execution I can see only Even Thread print 20, nothing else.Why this is happening?
Question 2> After completion of printing 1 to 20 properly how I should stop the execution of the program?

Thanks

1 year ago
Hi,
     I am new to CXF and SOAP web services. I need to migrate from CXF2.x to 3.1.x in my project.SOAP is only using in the project.I copied all the jars of cxf 3.1.x to my project lib directory.So jar related no issue is there,
ant is building the project properly.But I have abc.wsdl. From this wsdl java classes were generating what mentioned in the wsdl:portType tag before migration.If Abcd is mentioned in wsdl:portType then
Abcd.java was genererting.

After upgraded to 3.1.x , java classes are generating based on xs:element tag.

Ex: <xs:element name="Aaa" type="tns:aaa"/>
So Aaa.java is generated.WSDL has many <xs:element name=... tag , so many java classes are generating, which is not the requirement. Abcd.java is not generating so SOAP call is failing. >


Below code is mentioned in the build.xml to convert from WSDLToJava ---
       


What change/steps I need to do to generate java classes properly from WSDL.

Thanks

1 year ago
Hi Junilu,
               Thanks for the idea. My knowledge limited to wait, notify , coundownlatch , cyclicbarrier .Semhaphoe and mutex still I haven't studied.I will check those and get back for any query.

Thanks
Abhra
1 year ago
That's true. But is there any option so that we can achieve this.
1 year ago
Hi ,

I have two threads, say Thread-1(print 1) and Thread-2(print 2). How I can call them in loop such that they will execute alternatively,
Output---  1 2 1 2 1 2 .....

Below code give me a output ----- 1 2 2 2 2 2 1 and then release the lock but no thread available to get the lock .



How we I can modify the code ?
Thanks
1 year ago
Hi,
    I am executing the below code and get output like ---
1
2
java.lang.IllegalMonitorStateException
at java.lang.Object.notify(Native Method)
at THREAD.Thread2.run(ThreadTest.java:42)
at java.lang.Thread.run(Unknown Source)

wait() and nofity() is calling from synchronize block then why this exception is coming?



Thanks
1 year ago