+++ /dev/null
-package com.indexdata.pz2utils4jsf.pazpar2;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-import javax.inject.Qualifier;\r
-\r
-@Qualifier\r
-@Retention(RetentionPolicy.RUNTIME)\r
-@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})\r
-public @interface ForServiceProxy {\r
-\r
-}\r
\r
public Pz2Bean () {\r
logger.info("Instantiating pz2 bean [" + Utils.objectId(this) + "]");\r
- logger.debug("in Pz2Bean configurator is " + configurator);\r
}\r
\r
@PostConstruct\r
public void instantiatePz2SessionObject() { \r
logger.debug("in start of Pz2Bean post-construct configurator is " + configurator);\r
- logger.debug(Utils.objectId(this) + " will instantiate a Pz2Session next.");\r
+ logger.debug(Utils.objectId(this) + " will instantiate a Pz2Client next.");\r
searchClient = new Pz2Client();\r
logger.info("Using [" + Utils.objectId(searchClient) + "] configured by [" \r
+ Utils.objectId(configurator) + "] on session [" \r
+ Utils.objectId(pz2) + "]" ); \r
pz2.configureClient(searchClient,configurator); \r
- logger.debug("in end of Pz2Bean post-construct configurator is " + configurator);\r
-\r
} \r
\r
/* (non-Javadoc)\r
\r
import com.indexdata.pz2utils4jsf.config.Configuration;\r
import com.indexdata.pz2utils4jsf.config.ConfigurationReader;\r
+import com.indexdata.pz2utils4jsf.pazpar2.sp.ForServiceProxy;\r
import com.indexdata.pz2utils4jsf.pazpar2.sp.ServiceProxyClient;\r
import com.indexdata.pz2utils4jsf.pazpar2.sp.ServiceProxyInterface;\r
import com.indexdata.pz2utils4jsf.pazpar2.sp.ServiceProxySession;\r
private static Logger logger = Logger.getLogger(Pz2ProxyBean.class); \r
\r
@Inject ConfigurationReader configurator;\r
- @Inject ServiceProxyUser user;\r
- \r
+ @Inject ServiceProxyUser user; \r
@Inject @ForServiceProxy ServiceProxySession pz2;\r
\r
public Pz2ProxyBean() {\r
}\r
\r
@PostConstruct\r
- public void instantiatePz2SessionObject() {\r
- logger.debug(Utils.objectId(this) + " will instantiate a Pz2Session object next."); \r
+ public void instantiateServiceProxyClient() {\r
+ logger.debug(Utils.objectId(this) + " will instantiate a ServiceProxyClient next."); \r
searchClient = new ServiceProxyClient();\r
logger.info("Using [" + Utils.objectId(searchClient) + "] configured by [" \r
+ Utils.objectId(configurator) + "] on session [" \r
--- /dev/null
+package com.indexdata.pz2utils4jsf.pazpar2.sp;\r
+\r
+import java.lang.annotation.ElementType;\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.RetentionPolicy;\r
+import java.lang.annotation.Target;\r
+\r
+import javax.inject.Qualifier;\r
+\r
+@Qualifier\r
+@Retention(RetentionPolicy.RUNTIME)\r
+@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})\r
+public @interface ForServiceProxy {\r
+\r
+}\r
import java.io.IOException;\r
import java.io.UnsupportedEncodingException;\r
\r
+import javax.enterprise.context.SessionScoped;\r
+\r
import org.apache.log4j.Logger;\r
\r
-import com.indexdata.pz2utils4jsf.pazpar2.ForServiceProxy;\r
import com.indexdata.pz2utils4jsf.pazpar2.Pz2Session;\r
import com.indexdata.pz2utils4jsf.pazpar2.commands.CommandParameter;\r
import com.indexdata.pz2utils4jsf.pazpar2.sp.auth.ServiceProxyUser;\r
import com.indexdata.pz2utils4jsf.utils.Utils;\r
\r
-@ForServiceProxy\r
+@ForServiceProxy @SessionScoped\r
public class ServiceProxySession extends Pz2Session implements ServiceProxyInterface {\r
\r
private ServiceProxyUser user; \r
private String initDocResponse = ""; \r
\r
public ServiceProxySession() {\r
- logger.info("Instantiating pz2 session object [" + Utils.objectId(this) + "]");\r
+ logger.info("Instantiating SP pz2 session object [" + Utils.objectId(this) + "]");\r
}\r
\r
public void setUser(ServiceProxyUser user) {\r