Hi Isomorphic
I face a new problem in my project. I want to open a page multiple times in multiple tab in same login in same browser(in a single session).
Page is opening multiple times in multiple tab but problem is, in server it is creating single instance (Which is created for first tab).
I want, for each tab there will be a new object of my server class.
for example there is a page test.java in client.
in server entry point for test.java is MB_test.java.
For test.java i load test.ds.xml using
String[] dsIDs = new String[7];
dsIDs[1] = "test";
DataSource.load(dsIDs, new Function() {
@Override
public void execute() {
}
},false);
After <fields></fields> defination in test.ds.xml i define
<serverObject lookupStyle="spring" bean="testBean"/>
in my war\WEB-INF\applicationContext.xml file i define bean defination for "testBean"
<bean id="testBean" class="com.server.caller.MB_test" scope="session" />
My applicationContext is look like :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="testBean" class="com.server.caller.MB_test" scope="session" />
</bean>
When i open test page in Tab1 it creating new instance like MB_test@12ert40
The problem is when i open test page in Tab2 /Tab3/tab4 it is not creating a new instacne, it is taking old instance( MB_test@12ert40)
I want for each tab (new opening of test page) it will create a new instance.
Configuration in my web.xml is
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<listener>
<listener-class>org.springframework.web.context.request.Requ estContextListener</listener-class>
</listener>
<listener> <listener-class>com.syncrooms.server.rpcImpl.TimerService</listener-class> </listener>
<listener>
<listener-class>org.springframework.web.context.request.Requ estContextListener</listener-class>
</listener>
<listener> <listener-class>com.syncrooms.server.rpcImpl.TimerService_Qu eServe</listener-class> </listener>
Is it possible to create a new instance each tab (new opening of test page).
Please give me a solution how to acheive this.
Please reply
I am using Firwfox 25.0.1,Chrome Version 32.0.1700.107 m,IE 89 and SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)
I face a new problem in my project. I want to open a page multiple times in multiple tab in same login in same browser(in a single session).
Page is opening multiple times in multiple tab but problem is, in server it is creating single instance (Which is created for first tab).
I want, for each tab there will be a new object of my server class.
for example there is a page test.java in client.
in server entry point for test.java is MB_test.java.
For test.java i load test.ds.xml using
String[] dsIDs = new String[7];
dsIDs[1] = "test";
DataSource.load(dsIDs, new Function() {
@Override
public void execute() {
}
},false);
After <fields></fields> defination in test.ds.xml i define
<serverObject lookupStyle="spring" bean="testBean"/>
in my war\WEB-INF\applicationContext.xml file i define bean defination for "testBean"
<bean id="testBean" class="com.server.caller.MB_test" scope="session" />
My applicationContext is look like :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="testBean" class="com.server.caller.MB_test" scope="session" />
</bean>
When i open test page in Tab1 it creating new instance like MB_test@12ert40
The problem is when i open test page in Tab2 /Tab3/tab4 it is not creating a new instacne, it is taking old instance( MB_test@12ert40)
I want for each tab (new opening of test page) it will create a new instance.
Configuration in my web.xml is
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<listener>
<listener-class>org.springframework.web.context.request.Requ estContextListener</listener-class>
</listener>
<listener> <listener-class>com.syncrooms.server.rpcImpl.TimerService</listener-class> </listener>
<listener>
<listener-class>org.springframework.web.context.request.Requ estContextListener</listener-class>
</listener>
<listener> <listener-class>com.syncrooms.server.rpcImpl.TimerService_Qu eServe</listener-class> </listener>
Is it possible to create a new instance each tab (new opening of test page).
Please give me a solution how to acheive this.
Please reply
I am using Firwfox 25.0.1,Chrome Version 32.0.1700.107 m,IE 89 and SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)