openamf/src/java/org/openamf/invoker WebServiceInvoker.java,1.19,1.20 JMXServiceInvoker.java,1.5,1.6 PageableResultSetServiceInvoker.java,1.3,1.4 JavaServiceInvoker.java,1.16,1.17 ServiceInvoker.java,1.6,1.7 EJBServiceInvoker.java,1.2,1.3

[email protected]
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf/invoker
In directory sc8-pr-cvs1:/tmp/cvs-serv16187/src/java/org/openamf/invoker

Modified Files:
	WebServiceInvoker.java JMXServiceInvoker.java 
	PageableResultSetServiceInvoker.java JavaServiceInvoker.java 
	ServiceInvoker.java EJBServiceInvoker.java 
Log Message:
1) Initial PageableRecordSet support, still needs testing and cleanup
2) Added HttpServletRequest to ServiceInvoker constructor
3) Added PageableRecordSet config
4) Config is now a singleton and can be accessed from Config.getInstance()


Index: WebServiceInvoker.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/invoker/WebServiceInvoker.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** WebServiceInvoker.java	25 May 2003 00:32:54 -0000	1.19
--- WebServiceInvoker.java	28 May 2003 15:53:26 -0000	1.20
***************
*** 9,12 ****
--- 9,15 ----
  import java.util.List;
  
+ import javax.servlet.ServletContext;
+ import javax.servlet.http.HttpServletRequest;
+ 
  import org.apache.axis.client.Service;
  import org.apache.commons.logging.Log;
***************
*** 22,30 ****
  	public WebServiceInvoker(
  		ServiceRequest request,
! 		javax.servlet.ServletContext ctx) {
! 
! 		super(request, ctx);
  
! 	}
  
  	public Object invokeService() throws ServiceInvocationException {
--- 25,33 ----
  	public WebServiceInvoker(
  		ServiceRequest request,
! 		HttpServletRequest httpServletRequest,
! 		ServletContext servletContex) {
  
! 	super(request, httpServletRequest, servletContex);
! }
  
  	public Object invokeService() throws ServiceInvocationException {

Index: JMXServiceInvoker.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/invoker/JMXServiceInvoker.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** JMXServiceInvoker.java	30 Apr 2003 01:02:06 -0000	1.5
--- JMXServiceInvoker.java	28 May 2003 15:53:26 -0000	1.6
***************
*** 7,10 ****
--- 7,11 ----
  import javax.management.ObjectName;
  import javax.servlet.ServletContext;
+ import javax.servlet.http.HttpServletRequest;
  
  import org.apache.commons.logging.Log;
***************
*** 18,24 ****
  	public JMXServiceInvoker(
  		ServiceRequest request,
  		ServletContext servletContex) {
  			
! 		super(request, servletContex);
  	}
  
--- 19,26 ----
  	public JMXServiceInvoker(
  		ServiceRequest request,
+ 		HttpServletRequest httpServletRequest,
  		ServletContext servletContex) {
  			
! 		super(request, httpServletRequest, servletContex);
  	}
  

Index: PageableResultSetServiceInvoker.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/invoker/PageableResultSetServiceInvoker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PageableResultSetServiceInvoker.java	25 May 2003 00:32:54 -0000	1.3
--- PageableResultSetServiceInvoker.java	28 May 2003 15:53:27 -0000	1.4
***************
*** 2,5 ****
--- 2,6 ----
  
  import javax.servlet.ServletContext;
+ import javax.servlet.http.HttpServletRequest;
  
  import org.openamf.ServiceRequest;
***************
*** 10,19 ****
  	public PageableResultSetServiceInvoker(
  		ServiceRequest request,
  		ServletContext servletContext) {
! 		super(request, servletContext);
  	}
  
  	public Object invokeService() throws ServiceInvocationException {
! 		return null;
  	}
  
--- 11,40 ----
  	public PageableResultSetServiceInvoker(
  		ServiceRequest request,
+ 		HttpServletRequest httpServletRequest,
  		ServletContext servletContext) {
! 		super(request, httpServletRequest, servletContext);
  	}
  
  	public Object invokeService() throws ServiceInvocationException {
! 		
! 		Object serviceResult = null;
! 		
! 		if (request.getServiceMethodName().equalsIgnoreCase("getRecords")) {
! 			serviceResult = getRecords();
! 		}
! 		
! 		return serviceResult;
! 	}
! 
! 	private Object getRecords() {
! 		
! 		String rsId = (String)getRequest().getParameters().get(0);
! 		int from = ((Number)getRequest().getParameters().get(1)).intValue() - 1;
! 		int count = ((Number)getRequest().getParameters().get(2)).intValue();
! 		
! 		ASRecordSet recordSet = (ASRecordSet) getHttpServletRequest().getSession().getAttribute(rsId);
! 
! 		return recordSet.getRecords(from, count);
! 		
  	}
  

Index: JavaServiceInvoker.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/invoker/JavaServiceInvoker.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** JavaServiceInvoker.java	28 May 2003 01:01:31 -0000	1.16
--- JavaServiceInvoker.java	28 May 2003 15:53:27 -0000	1.17
***************
*** 8,11 ****
--- 8,12 ----
  
  import javax.servlet.ServletContext;
+ import javax.servlet.http.HttpServletRequest;
  
  import org.apache.commons.logging.Log;
***************
*** 19,25 ****
  	public JavaServiceInvoker(
  		ServiceRequest request,
  		ServletContext servletContex) {
  
! 		super(request, servletContex);
  	}
  
--- 20,27 ----
  	public JavaServiceInvoker(
  		ServiceRequest request,
+ 		HttpServletRequest httpServletRequest,
  		ServletContext servletContex) {
  
! 		super(request, httpServletRequest, servletContex);
  	}
  

Index: ServiceInvoker.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/invoker/ServiceInvoker.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ServiceInvoker.java	30 Apr 2003 19:40:32 -0000	1.6
--- ServiceInvoker.java	28 May 2003 15:53:27 -0000	1.7
***************
*** 5,8 ****
--- 5,9 ----
  
  import javax.servlet.ServletContext;
+ import javax.servlet.http.HttpServletRequest;
  
  import org.openamf.ServiceRequest;
***************
*** 12,15 ****
--- 13,17 ----
  
  	protected ServiceRequest request;
+ 	protected HttpServletRequest httpServletRequest;
  	protected ServletContext servletContext;
  	protected Object persistantServiceObject;
***************
*** 17,23 ****
--- 19,27 ----
  	public ServiceInvoker(
  		ServiceRequest request,
+ 		HttpServletRequest httpServletRequest,
  		ServletContext servletContext) {
  
  		this.request = request;
+ 		this.httpServletRequest = httpServletRequest;
  		this.servletContext = servletContext;
  	}
***************
*** 33,36 ****
--- 37,48 ----
  	}
  
+ 	public HttpServletRequest getHttpServletRequest() {
+ 		return httpServletRequest;
+ 	}
+ 
+ 	public void setHttpServletRequest(HttpServletRequest httpServletRequest) {
+ 		this.httpServletRequest = httpServletRequest;
+ 	}
+ 
  	public ServletContext getServletContext() {
  		return servletContext;
***************
*** 62,65 ****
--- 74,78 ----
  		String className,
  		ServiceRequest request,
+ 		HttpServletRequest httpServletRequest,
  		ServletContext servletContext)
  		throws
***************
*** 76,84 ****
  		Constructor constructor =
  			serviceInvokerClass.getConstructor(
! 				new Class[] { ServiceRequest.class, ServletContext.class });
  
  		serviceInvoker =
  			(ServiceInvoker) constructor.newInstance(
! 				new Object[] { request, servletContext });
  		return serviceInvoker;
  	}
--- 89,100 ----
  		Constructor constructor =
  			serviceInvokerClass.getConstructor(
! 				new Class[] {
! 					ServiceRequest.class,
! 					HttpServletRequest.class,
! 					ServletContext.class });
  
  		serviceInvoker =
  			(ServiceInvoker) constructor.newInstance(
! 				new Object[] { request, httpServletRequest, servletContext });
  		return serviceInvoker;
  	}

Index: EJBServiceInvoker.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/invoker/EJBServiceInvoker.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EJBServiceInvoker.java	22 May 2003 02:03:34 -0000	1.2
--- EJBServiceInvoker.java	28 May 2003 15:53:27 -0000	1.3
***************
*** 10,13 ****
--- 10,14 ----
  import javax.naming.InitialContext;
  import javax.servlet.ServletContext;
+ import javax.servlet.http.HttpServletRequest;
  
  import org.apache.commons.logging.Log;
***************
*** 23,29 ****
  	public EJBServiceInvoker(
  		ServiceRequest request,
  		ServletContext servletContex) {
  
! 		super(request, servletContex);
  	}
  
--- 24,31 ----
  	public EJBServiceInvoker(
  		ServiceRequest request,
+ 		HttpServletRequest httpServletRequest,
  		ServletContext servletContex) {
  
! 		super(request, httpServletRequest, servletContex);
  	}
  




-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.