Announcement Announcement Module
No announcement yet.
Create bean object Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create bean object

    Please help me

    1. Is Service endpoint thread safe? I know it is by default singleton we can use scope prototype. but it is not creating multiple instances for every request.

    <bean id="checkEndPoint" class="com.svcs.CheckServiceEndpoint" scope="prototype">
    <constructor-arg index="0"><ref bean="getDao"/></constructor-arg>
    <property name="marshaller" ref="marshaller"/>
    <property name="unmarshaller" ref="marshaller"/>

    <bean id="getDao" class="com.service.dao.MyDaoImpl" scope="prototype" destroy-method="releaseConnection">


    it always create only one instance. what do I have suppose to do to invoke and create instance every request

    public class CheckServiceEndpoint extends AbstractFaultCreatingValidatingMarshallingPayloadE ndpoint{

    private com.service.dao.MyDAO daoObject;
    public FormIdDeterminationServiceEndpoint(com.service.dao .MyDAO daoObject) {
    this.daoObject = daoObject;
    System.out.println("End Point Created");

    protected Object invokeInternal(Object request) throws Exception {

    Problem with this is daoObject is always have instance when it was created. I want to create everytime request is made.
    How do I create instance of dao inside the invokeInternal object. this should solve my issue and safe

  • #2
    I am new to Spring but i think the following link may solve you problem.

    Muein Muzamil