sidhartha pani

Greenhorn
+ Follow
since Aug 20, 2016
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sidhartha pani

Below are the logs:
2017-02-07 05:32:10,988 [main] INFO  org.springframework.test.context.transaction.TransactionContext  - Began transaction (1) for test context [DefaultTestContext@428a9fad testClass = BefClassUnitImplTest, testInstance = com.ikea.rix.common.corporateBaseData.bef.impl.BefClassUnitImplTest@1af938fc, testMethod = testInsertClassUnit@BefClassUnitImplTest, testException = [null], mergedContextConfiguration = [MergedContextConfiguration@3d2a8cf8 testClass = BefClassUnitImplTest, locations = '{classpath:com/ikea/rix/common/test/RixJavaCommonIntegrationUnitTestCaseContext.xml, classpath:/com/ikea/rix/test/BaseIntegrationUnitTestCaseContext.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', contextCustomizers = set[[empty]], contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]]; transaction manager [org.springframework.jdbc.datasource.DataSourceTransactionManager@3d20e870]; rollback [true] (TransactionContext.java:101)
2017-02-07 05:32:11,034 [main] INFO  org.springframework.test.jdbc.JdbcTestUtils  - Deleted 0 rows from table C_CBD_CLASS_UNIT_T (JdbcTestUtils.java:100)
2017-02-07 05:32:11,206 [main] INFO  org.springframework.test.context.transaction.TransactionContext  - Rolled back transaction for test context [DefaultTestContext@428a9fad testClass = BefClassUnitImplTest, testInstance = com.ikea.rix.common.corporateBaseData.bef.impl.BefClassUnitImplTest@1af938fc, testMethod = testInsertClassUnit@BefClassUnitImplTest, testException = [null], mergedContextConfiguration = [MergedContextConfiguration@3d2a8cf8 testClass = BefClassUnitImplTest, locations = '{classpath:com/ikea/rix/common/test/RixJavaCommonIntegrationUnitTestCaseContext.xml, classpath:/com/ikea/rix/test/BaseIntegrationUnitTestCaseContext.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', contextCustomizers = set[[empty]], contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]]. (TransactionContext.java:136)
2017-02-07 05:32:11,253 [main] INFO  org.springframework.test.context.transaction.TransactionContext  - Began transaction (1) for test context [DefaultTestContext@428a9fad testClass = BefClassUnitImplTest, testInstance = com.ikea.rix.common.corporateBaseData.bef.impl.BefClassUnitImplTest@71db7651, testMethod = testInsertMap@BefClassUnitImplTest, testException = [null], mergedContextConfiguration = [MergedContextConfiguration@3d2a8cf8 testClass = BefClassUnitImplTest, locations = '{classpath:com/ikea/rix/common/test/RixJavaCommonIntegrationUnitTestCaseContext.xml, classpath:/com/ikea/rix/test/BaseIntegrationUnitTestCaseContext.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', contextCustomizers = set[[empty]], contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]]; transaction manager [org.springframework.jdbc.datasource.DataSourceTransactionManager@3d20e870]; rollback [true] (TransactionContext.java:101)
2017-02-07 05:32:11,253 [main] INFO  org.springframework.test.jdbc.JdbcTestUtils  - Deleted 1 rows from table C_CBD_CLASS_UNIT_T (JdbcTestUtils.java:100)

Note : here it is hanging
3 years ago
need a small information on Junits when testing with Maven and eclipse. When I am running test cases in eclipse getting passed. But the same test cases when I run through maven getting failed. I am using Spring with Junit. After testInsertClassUnit executed successfully.While executing flushHibernateSession() of testInsertMap() method it is hanging.

Below is the code:

3 years ago
HI, When I am going through the @AliasFor annotation in spring, they have introduced the topic "declare aliases for annotation attributes" ? Can some one explain me what is aliases for attributed?

Below the is code:
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.METHOD})
@Documented
public @interface AliasFor
{
 @AliasFor("attribute")
 String value() default "";
 
 @AliasFor("value")
 String attribute() default "";
 
 Class<? extends Annotation> annotation() default Annotation.class;
}
3 years ago
When to use thread.currentthread().getcontextclassloader() and normal class loader please let me the difference between them.
4 years ago

Sergej Smoljanov wrote:Also you can change BeforeAspect (your custom aspect class like this)


note:
@Pointcut("execution (* com.Student.addCustomer())") - you place your pointcut outside @Before and now you can use it as below
and this
@Before(value = "com.BeforeAspect.m()")

4 years ago
@Aspect
public class Beforeaspect {

@Before("com.beans.Student.addCustomer()")
public void logBefore(JoinPoint jp)
{
System.out.println("logbefore");
System.out.println("method "+jp.getSignature().getName());
}
}
public class Student implements Studentimpl {

@Override
public void addCustomer() {
// TODO Auto-generated method stub
System.out.println("addcustomer");

}

@Override
public String addCustomername(String stud) {
// TODO Auto-generated method stub
System.out.println("addcustomername");
return "hello";
}
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

<aop:aspectj-autoproxy/>

<bean id="stud" class="com.beans.Student"/>
<bean  class="com.beans.Beforeaspect"/>

</beans>
public class Test {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub


@SuppressWarnings("resource")
ApplicationContext context = new ClassPathXmlApplicationContext("com/xmlfiles/beans.xml");
Studentimpl studs=(Studentimpl) context.getBean("stud");

// System.out.println(studs.addCustomers());
//studs.addCustomername("aaa");
studs.addCustomer();



}

}

I am using java 8 and spring 4.3
4 years ago