Search Results

Search found 2367 results on 95 pages for 'spring'.

Page 17/95 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • First steps in Spring Framework

    - by theband
    I have downloaded Spring Framework and using SpringSource dm Server. I just need to write a simple Hello world using Spring Framework. I don't know about the configuration and where to write the JAVA code. I did a google, but could not find anything that can help me out.

    Read the article

  • Spring 3 replacement for isDisabledInThisEnvironment

    - by kayahr
    I'm currently converting a test class which extended the Spring class AbstractTransactionalSpringContextTests to Spring 3. This abstract class is now deprecated and I should use AbstractJUnit38SpringContextTests. The test class had this method in it: @Override protected boolean isDisabledInThisEnvironment(String testMethodName) { // Test is only needed for bugfixing and development. Do not check in with this flag on false. return true; } What is the replacement for this isDisabledInThisEnvironment method?

    Read the article

  • Delegating Struts action class management to Spring raises MTIA critical voilation in Findbugs

    - by shabeer
    When i use "Delegate Struts Action management to Spring" approach explained in http://www.ibm.com/developerworks/java/library/j-sr2.html#N101B7 things work fine in terms of functionality but findbugs reports following voilation Dodgy - Class extends Struts Action class and uses instance variables:MTIA I have bean dependencies injected into action class through spring . Please help me and suggest me a cleaner way to solve this problem. Thanks

    Read the article

  • Spring Dispatcher Servlet Not Found Problem

    - by hamam
    I'm trying to build a simple spring web application but I get the following error when I run it on Apache Tomcat 6.0 Class Not Found Exception org.springframework.web.servlet.DispatcherServlet I'm using maven to handle libraries. At first I thought it was maven's fault but it adds spring and other libraries succesfully. I tried to import "org.springframework.web.servlet.DispatcherServlet" in a source file and my project has the right package and classes. My development environment : Ubuntu 10.4 Eclipse IDE Tomcat 6.0 I'd appreciate any help

    Read the article

  • Spring transaction management breaks hibernate cascade

    - by TimmyJ
    I'm having a problem where the addition of spring's transaction management to an application causes Hibernate to throw the following error: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: org.fstrf.masterpk.domain.ReportCriteriaBean.treatmentArms org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:96) org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:39) org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:218) org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:77) org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) org.springframework.orm.hibernate3.SpringSessionSynchronization.beforeCommit(SpringSessionSynchronization.java:135) org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:72) org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:905) org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:715) org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy92.saveNewReportCriteria(Unknown Source) org.fstrf.masterpk.domain.logic.MasterPkFacade.saveNewReportCriteria(MasterPkFacade.java:134) org.fstrf.masterpk.controllers.ReportCriteriaController.setupReportType(ReportCriteriaController.java:302) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:413) org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:134) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:310) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:297) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) I'm using Spring 2.5 and annotations to implement this management. Here is the class containing the saveNewReportCriteria method (which, as can be seen by the stack trace, is causing the error) @Transactional( propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, readOnly = false) public class HibernateReportCriteriaDao implements ReportCriteriaDao{ private HibernateTemplate hibernateTemplate; public Integer saveNewReportCriteria(ReportCriteriaBean reportCriteria) { hibernateTemplate.save(reportCriteria); List<Integer> maxIdList = hibernateTemplate.find("SELECT max(id) from ReportCriteriaBean"); logger.info("ID of newly saved list is: " + maxIdList.get(0)); return maxIdList.get(0); } public void setHibernateTemplate(HibernateTemplate hibernateTemplate) { this.hibernateTemplate = hibernateTemplate; } } Then I added the following sections to my configuration files to tell spring that I am using annotation driven transaction management: <bean id="actgDataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="jdbc/actg" /> <property name="resourceRef" value="true" /> </bean> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="actgDataSource" /> </bean> <tx:annotation-driven/> I'm pretty sure that the de-referencing error is being caused due to the proxy class that Spring AOP creates and uses in order to handle transaction management, but I have no idea how I'd go about fixing it.

    Read the article

  • spring security filter-chain regex pattern

    - by lewap
    In my application which uses spring security I want to define two different areas both using their own spring security filter-chain. My question is: is it possible to define two regex expressions as follows: every path starting with /foobar/* every other path not starting with /foobar The important part here is that the second path should also match if somewhere within it, but not in the beginning, it cotains the /foobar/ string. Thanks

    Read the article

  • Spring, iBatis, MySQL - how to manage transactions?

    - by Enrique
    Hello I'm building a web application with spring ibatis and mysql. I'm going to use mysql stored procedures and I will call them with ibatis. My question is about how to manage the transactions. Should I manage the transactions inside the stored procedures or with spring/ibatis or with both?

    Read the article

  • User Session Management with Spring

    - by Chris
    I am developing a flex java - spring web app and have set up the business logic using hibernate. I want to maintain sessions so that when the user logs in , i can track the logged in user to display information that is related to the username. I want to do this using spring if possible and wondered if anyone could redirect me to a tutorial or even explain the method to which this is achieved , or if it is hard to achieve. Thanks Chris

    Read the article

  • Stateful beans and Stateless beans in Spring context

    - by umesh awasthi
    Hi All, i am reading spring through its official documentation and at one place i came to a line that use prototype scope for for all statefull beans while singleton for stateless beans. i know there is something as statefull as well stateless beans in EJB but this is not what they have mentioned in the documents. Can any one explain me what exact this means of statefull as well stateless beans in Spring Thanks in advance

    Read the article

  • Trying to setup externalizing properties in spring

    - by Gandalf StormCrow
    Hi all, I'm building my project with maven so according to maven way, config should be in src/main/conf , how can I say to my spring application context that that is where jdbc.properties is found? Here is example bean : <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="jdbc.properties" /> </bean> Spring assumens that this configuration is inside src/main/webapp/WEB-INF, I hope I've been clear if not I'll rephrase my question thank you

    Read the article

  • Profiling a Java Spring application

    - by niklassaers
    Hi guys, I have a Spring application that I believe has some bottlenecks, so I'd like to run it with a profiler to measure what functions take how much time. Any recommendations to how I should do that? I'm running STS, the project is a maven project, and I'm running Spring 3.0.1 Cheers Nik

    Read the article

  • How to get data source for Spring Security Web in Java code

    - by user1443689
    I'm creating a ZK Web application which uses Spring Security for authentication and I'm trying to implement a create user function, where the administrator supplies the details and the user account is created. I've got to the part where I want to put this data into the database, but now I'm thinking I shouldn't hard code the connection to the database, there must be a way to get the connection details from the Spring Security configuration. Is there? If so how?

    Read the article

  • Spring Framework 3.0.5 MVC Issue

    - by user578923
    I know that this may be absolutely dumb but for the life of me I cannot figure out why I'm getting these errors in my Spring Project, it is basically from the MVC tutorial with a few modifications. This is the error I get when running my tomcat server. `Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/SimpleFormController at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1581) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) at org.springframework.util.ClassUtils.forName(ClassUtils.java:257) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1271) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1242) ... 54 more Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.SimpleFormController at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 71 more` I just cannot figure out the issue with my classpath...I would appreciate any help. Here are all the jars in my classpath. I know that the class is inside the web-servlet jar but it's not seeing it. Is there a conflict? aopalliance.jar aspectjweaver.jar commons-codec.jar commons-dbcp.jar commons-logging.jar commons-pool.jar jstl.jar org.springframework.aop-3.0.5.RELEASE.jar org.springframework.asm-3.0.5.RELEASE.jar org.springframework.aspects-3.0.5.RELEASE.jar org.springframework.beans-3.0.5.RELEASE.jar org.springframework.context.support-3.0.5.RELEASE.jar org.springframework.context-3.0.5.RELEASE.jar org.springframework.core-3.0.5.RELEASE.jar org.springframework.expression-3.0.5.RELEASE.jar org.springframework.instrument.tomcat-3.0.5.RELEASE.jar org.springframework.instrument-3.0.5.RELEASE.jar org.springframework.jdbc-3.0.5.RELEASE.jar org.springframework.jms-3.0.5.RELEASE.jar org.springframework.orm-3.0.5.RELEASE.jar org.springframework.oxm-3.0.5.RELEASE.jar org.springframework.test-3.0.5.RELEASE.jar org.springframework.transaction-3.0.5.RELEASE.jar org.springframework.web.portlet-3.0.5.RELEASE.jar org.springframework.web.servlet-3.0.5.RELEASE.jar org.springframework.web.struts-3.0.5.RELEASE.jar org.springframework.web-3.0.5.RELEASE.jar postgresql-9.0-801.jdbc3.jar servlet-api.jar spring-security-config-3.0.5.RELEASE.jar spring-security-core-3.0.5.RELEASE.jar spring-security-web-3.0.5.RELEASE.jar standard.jar

    Read the article

  • Status messages on the Spring MVC-based site (annotation controller)

    - by linpulee
    What is the best way to organize status messages on the Spring MVC-based site? I mean messages which, for example, returns when user has sent What is the best way to organize status messages ("Your data has been successfully saved/added/deleted") on the Spring MVC-based site using annotation controller? So, the issue is in the way of sending the message from POST-method in contoller.

    Read the article

  • @Transactional in Spring+Hibernate

    - by Arun Kumar
    I an using Spring 3.1 + Hibernate 4.x in my web application. In my DAO, i am saving User type object as following sessionFactory.getCurrentSession().save(user); But getting following exception: org.hibernate.HibernateException: save is not valid without active transaction I googled and found similar question on SO, with following solution: Session session=getSessionFactory().getCurrentSession(); Transaction trans=session.beginTransaction(); session.save(entity); trans.commit(); That solves the problem. But in that solution, there is lot of mess of beginning and committing the transactions manually. Can't i use sessionFactory.getCurrentSession().save(user); directly without begin/commit of transactions manually? I try to use @Transactional on my service/dao methods too, but the problem persists. EDIT : Here is my Hibernate Config File: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd"> <!-- enable the configuration of transactional behavior based on annotations --> <tx:annotation-driven transaction-manager="txManager"/> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" p:driverClassName="${db.driverClassName}" p:url="${db.url}" p:username="${db.username}" p:password="${db.password}" /> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="packagesToScan" value="com.myapp.entities" /> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> </bean> <!--Transaction Manager Added --> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> </beans> Please help.

    Read the article

  • XSD Client in Spring

    - by wuntee
    I have an XSD document that I need to communicate with an endpoint (client side only) - is there this functionality built into spring? I have been using JAXB, but was wondering if spring has some sort of wrapper. Thanks.

    Read the article

  • Configuring servlet for using spring

    - by dominolog
    Hello How to configure my web application in Eclipse (based on Servlets and deployed to Tomcat) to use Spring framework. I need only IoC container (Beans only and ApplicationContext), not Spring MVC. How to configure web.xml for this? Regards

    Read the article

  • Instantiating custom PropertySourcesPlaceholderConfigurer from spring context

    - by mmona
    I want to define a custom PropertySourcesPlaceholderConfigurer in spring context xml. I want to use there multiple PropertySources, so that I can load part of the configuration from several property files and provide other part dynamically by my custom PropertySource implementation. The advantage is that it should be then easy to adjust the order of loading these property sources just by making modifications to the xml spring configuration. And here I run into a problem: how to define an arbitrary list of PropertySources and inject it into PropertySourcesPlaceholderConfigurer, so that it uses the sources defined by me? Seems to be a basic thing that should be provided by spring, but since yesterday I cannot find a way to do it. Using namespace would enable me to load several property files, but I also need to define the id of the PropertySourcesPlaceholderConfigurer (as other projects refer to it), and also I want to use my custom implementation. That is why I am defining the bean explicitly and not using the namespace. The most intuitive way would be to inject a list of PropertySources into PropertySourcesPlaceholderConfigurer like this: <bean id="applicationPropertyPlaceholderConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders" value="true" /> <property name="ignoreResourceNotFound" value="true" /> <property name="order" value="0"/> <property name="propertySources"> <list> <!-- my PropertySource objects --> </list> </property> </bean> but unfortunately propertySources is of type PropertySources and does not accept a list. The PropertySources interface has one and only implementor which is MutablePropertySources, which indeed stores list of PropertySource objects, but has no constructor nor setter through which I can inject this list. It only has add*(PropertySource) methods. The only workaround I see now is to implement my own PropertySources class, extending MutablePropertySources, which would accept list of PropertySource objects on creation and manually add it via using add*(PropertySource) method. But why so much workaround would be needed to provide something that I thought was supposed to be the main reason of introducing the PropertySources (having flexible configuration manageable from spring configuration level). Please clarify what am I getting wrong :)

    Read the article

  • Problems using HibernateTemplate: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;

    - by user2104160
    I am quite new in Spring world and I am going crazy trying to integrate Hibernate in Spring application using HibernateTemplate abstract support class I have the following class to persist on database table: package org.andrea.myexample.HibernateOnSpring.entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="person") public class Person { @Id @GeneratedValue(strategy=GenerationType.AUTO) private int pid; private String firstname; private String lastname; public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } } Next to it I have create an interface named PersonDAO in wich I only define my CRUD method. So I have implement this interface by a class named PersonDAOImpl that also extend the Spring abstract class HibernateTemplate: package org.andrea.myexample.HibernateOnSpring.dao; import java.util.List; import org.andrea.myexample.HibernateOnSpring.entity.Person; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; public class PersonDAOImpl extends HibernateDaoSupport implements PersonDAO{ public void addPerson(Person p) { getHibernateTemplate().saveOrUpdate(p); } public Person getById(int id) { // TODO Auto-generated method stub return null; } public List<Person> getPersonsList() { // TODO Auto-generated method stub return null; } public void delete(int id) { // TODO Auto-generated method stub } public void update(Person person) { // TODO Auto-generated method stub } } (at the moment I am trying to implement only the addPerson() method) Then I have create a main class to test the operation of insert a new object into the database table: package org.andrea.myexample.HibernateOnSpring; import org.andrea.myexample.HibernateOnSpring.dao.PersonDAO; import org.andrea.myexample.HibernateOnSpring.entity.Person; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class MainApp { public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml"); System.out.println("Contesto recuperato: " + context); Person persona1 = new Person(); persona1.setFirstname("Pippo"); persona1.setLastname("Blabla"); System.out.println("Creato persona1: " + persona1); PersonDAO dao = (PersonDAO) context.getBean("personDAOImpl"); System.out.println("Creato dao object: " + dao); dao.addPerson(persona1); System.out.println("persona1 salvata nel database"); } } As you can see the PersonDAOImpl class extends HibernateTemplate so I think that it have to contain the operation of setting of the sessionFactory... The problem is that when I try to run this MainApp class I obtain the following exception: Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session; at org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:323) at org.springframework.orm.hibernate3.SessionFactoryUtils.getSession(SessionFactoryUtils.java:235) at org.springframework.orm.hibernate3.HibernateTemplate.getSession(HibernateTemplate.java:457) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:392) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:737) at org.andrea.myexample.HibernateOnSpring.dao.PersonDAOImpl.addPerson(PersonDAOImpl.java:12) at org.andrea.myexample.HibernateOnSpring.MainApp.main(MainApp.java:26) Why I have this problem? how can I solve it? To be complete I also insert my pom.xml containing my dependencies list: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.andrea.myexample</groupId> <artifactId>HibernateOnSpring</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>HibernateOnSpring</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <!-- Dipendenze di Spring Framework --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <!-- Usata da Hibernate 4 per LocalSessionFactoryBean --> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>3.2.0.RELEASE</version> </dependency> <!-- Dipendenze per AOP --> <dependency> <groupId>cglib</groupId> <artifactId>cglib</artifactId> <version>2.2.2</version> </dependency> <!-- Dipendenze per Persistence Managment --> <dependency> <!-- Apache BasicDataSource --> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <dependency> <!-- MySQL database driver --> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.23</version> </dependency> <dependency> <!-- Hibernate --> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.1.9.Final</version> </dependency> </dependencies> </project>

    Read the article

  • How to add custom SOAP-Header element to the generated WSDL in Spring-WS

    - by Petr Macek
    Hi, we are migrating from WebLogic web-services to Spring-WS (1.5.X). There is currently one issue we are facing: We need to pass a context object (on WLS it is passed as SOAP-Header element) to other services that are still running on WLS from the Spring-WS powered service. The header element is still formulated on client side and the newly created WS (Spring-WS) should just pass it to other services. I can imagine how the custom element would be passed: override the doWithMessage(WebServiceMessage message) method... Is there a way to generate the wsdl with the help of DefaultWsdl11Definition to contain that custom header element? See the example: <wsdl:operation name="GetSomeInformation"> <soap:operation soapAction="http://www.dummyservice.com/InformationService/GetSomeInformation" /> <wsdl:input> <soap:body use="literal" /> <soap:header message="ctx:ServiceContextMessage" part="serviceContext" use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> <wsdl:fault name="Error"> <soap:fault name="Error" use="literal" /> </wsdl:fault> </wsdl:operation> Thanks for help

    Read the article

  • Spring Security: Multiple Logins to the same resources: Form Login + Facebook Connect (uid, sessionK

    - by Daxon
    To begin I know about http://blog.kadirpekel.com/2009/11/09/facebook-connect-integration-with-spring-security/ The only problem is that it completely replaces the Form Login with Facebook Connect. I have the native form login in place, I also have Facebook Connect in place, Upon gathering user information I link it to a native account but without a password. At that point I would like to call a link or method to start process of going into the Spring Security Filter Chain. Here is the source code that works, but am trying to modify. It contains all the files I'm taking about. Now from what I understand I need to add a custom FacebookAuthenticationProvider so that my AuthenticationManager knows about it. <bean id="facebookAuthenticationProvider" class="org.springframework.security.facebook.FacebookAuthenticationProvider"> </bean> <security:authentication-manager alias="authenticationManager"> <security:authentication-provider ref="facebookAuthenticationProvider" /> </security:authentication-manager> Then within the FacebookAuthenticationProvider I would have to call an FacebookAuthenticationToken that would take my the current facebook Uid and SessionKey of the user. Then try authenticate this Token. So where does the FacebookAuthenticationFilter come into it? I'm just trying to understand the order at which these 3 files are called. As if you were trying to implement any other custom authentication. FacebookAuthenticationFilter.java FacebookAuthenticationProvider.java FacebookAuthenticationToken.java I have also posted this on the Spring Security Forum

    Read the article

  • google appengine local datastore integration testing with spring

    - by mirror303
    Hi all, I want to write some integration tests to see how my spring-managed DAO's behave when talking to the appengine datastore. Following the spring manual I will be providing my test-classes with the proper annotations: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:applicationContext.xml" }) After a lot of browsing I found this blog post dating back to august '09 from somebody doing exactly what I want to achieve. It involves writing a TestEnvironment class that implements ApiProxy.Environment plus talking to ApiProxyLocalImpl. However, if I look at the current docs (for version 1.3.1), it seems that this has been replaced by newing an instance of the framework provided LocalDatastoreServiceTestConfig which is passed to a LocalServiceTestHelper. It is too bad that the appengine docs don't show an example how to do this with JPA because then the spring wiring would be trivial. Trying to follow the route outlined in the blog posting has me running into a compiler messages telling me that classes such as ApiProxyLocalImpl are not visible by me. Hence, there must be a new way of doing it, which probably involves the LocalServiceTestHelper. My question: Does anybody know how? I know I will need to configure an EntityManagerFactory and provide it with the Datastore connection somehow... but how? :)

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >