How to Bind a process to a processor?
i am working on sun studio 12 & my project is on concept of multithreading.
i need to know how to bind a process to a particular core?
whats the command?
please give me some examples.
The processor_bind() function can be used to bind a specific [thread, LWP, process, process group, project, virtual machine] to a particular set of cores.
Similar Messages
-
All,
I have installed my iAS on 4 CPU 4 GB RAM Server.
I have increased the max threads to 256 and created 2 kjs engines.
How do i bind kjs processes to specific CPU?.
By default how many connections will iAS have. Is there any restriction on
max no of threads per iAS instance.
Would appreciate if you could look into this and do needful.
Regards,
Rengapbind is a unix utility. You can use it to bind any process to a particular
cpu.
Check the man pages.
You have thread configuration for both kxs and kjs. Just setting the threads
to a
maximum does not guarantee improved performance. Look at your application
and try to decide on the total number of requests which can concurrently
processed
at any given point of time. This can be the rough amount for your thread
settings.
kjs is the main workhorse... set more threads there...
kxs is like a dispatcher... if you have more threads on the sum of kjs, set
more threads there too.
Anycase performance in kjs beyond 256 threads would be debatable.. in my
opinion. Both in an appserver view as well as OS point of view.
Shankar.
"P.Renganathan" wrote:
All,
I have installed my iAS on 4 CPU 4 GB RAM Server.
I have increased the max threads to 256 and created 2 kjs engines.
How do i bind kjs processes to specific CPU?.
By default how many connections will iAS have. Is there any restriction on
max no of threads per iAS instance.
Would appreciate if you could look into this and do needful.
Regards,
Renga -
Hello,
on my page I have 2 items:checkbox and text area. How to bind its work processes together? For example, when checkbox is checked then Text area is disable and when not then enable.
Thanks' for help.
Karina.hi karina--
this, too, is javascript question. please see my answer to your previous post...
Multiselect list (LOV)
...regards,
raj -
How to bind an aggregated list to a variable in an IN or ANY clause
Hello, and thank you for helping -
I have a process that involves a parameter assertion, the result of which is a string for an IN or ANY clause. I am not able to figure out how to bind the result of the assertion to to executable SQL. The actual business process is long and laborious and, I decided, not worth explaining for the purpose of this forum. I have abstracted the process into some dummy data. The goal is to bind v_any_condition to :a. I could certainly build the SQL without the binding, but I would be very interested to know just the same what I am missing here (I'm sure something simple, or just a basic SQL rules that I have missed).
Thanks!
DECLARE
-- The goal is to bind v_any_condition in an ANY clause
v_any_condition VARCHAR2(30) DEFAULT '4,9,d'; -- the three rows to return from the sample data
-- v_any_condition VARCHAR2(30) DEFAULT DBMS_ASSERT.ENQUOTE_LITERAL('4')||','||
-- DBMS_ASSERT.ENQUOTE_LITERAL('9')||','||
-- DBMS_ASSERT.ENQUOTE_LITERAL('d');
v_sql varchar2(2048);
-- We'll create a simple cursor of VARCHAR2(1) just like DUAL.DUMMY
rc sys_refcursor;
rc_record dual%ROWTYPE;
v_counter NUMBER DEFAULT 0;
BEGIN -- Build the SQL. In this example, we decompose an aggregated string
-- containing the first 16 hex numbers. The result is a simple 16-row table
-- from which we will attempt to return the three rows by binding
-- v_any_condition to ANY in the SQL below.
v_sql := '
SELECT token
FROM ( -- materialize the list
WITH t AS (SELECT ''0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f'' AS txt FROM DUAL)
-- then decompose the list into rows
SELECT REGEXP_SUBSTR (txt, ''[^,]+'', 1, LEVEL) AS token
FROM t
CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(txt,''[^,]*''))+1
/* WHERE token = ANY(''4'',''9'',''d'') */ -- hardcoding works
WHERE token = ANY(:a) -- binding does not work; the goal is to get this to work '
OPEN rc FOR v_sql USING v_any_condition; -- when binding, we never even enter the loop
LOOP
v_counter := v_counter + 1;
FETCH rc INTO rc_record;
EXIT WHEN rc%NOTFOUND;
DBMS_OUTPUT.PUT_LINE (v_counter || ': '||rc_record.dummy);
END LOOP;
END;
Edited by: ltps on Jan 9, 2012 4:28 PMSuperb. Thank you very much.
For anyone who is interested in the solution I chose, here is the revised SQL that accepts a list as a bind variable after casting the list as a table. The "split string" code is below that. (What look like double quotes in the block below are actually consecutive single quotes.)
DECLARE
v_any_condition VARCHAR2(30) DEFAULT '4,9,d';
v_sql varchar2(2048);
rc sys_refcursor;
rc_record dual%ROWTYPE;
v_counter NUMBER DEFAULT 0;
BEGIN
v_sql := '
SELECT token
FROM (
WITH t AS (SELECT ''0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f'' AS txt FROM DUAL)
-- then decompose the list into rows
SELECT REGEXP_SUBSTR (txt, ''[^,]+'', 1, LEVEL) AS token
FROM t
CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(txt,''[^,]*''))+1
, TABLE(CAST(XX_SPLIT_STRING(:a,'','') AS XX_SPLIT_TABLE)) cst
WHERE cst.column_value = token'
OPEN rc FOR v_sql USING v_any_condition;
LOOP
v_counter := v_counter + 1;
FETCH rc INTO rc_record;
EXIT WHEN rc%NOTFOUND;
DBMS_OUTPUT.PUT_LINE (v_counter || ': '||rc_record.dummy);
END LOOP;
END;
-- And the main SQL, just for clarity:
SELECT token
FROM (
WITH t AS (SELECT '0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f' AS txt FROM DUAL)
SELECT REGEXP_SUBSTR (txt, '[^,]+', 1, LEVEL) AS token
FROM t
CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(txt,'[^,]*'))+1
, TABLE(CAST(XX_SPLIT_STRING('4,9,d',',') AS XX_SPLIT_TABLE)) cst
WHERE cst.column_value = token;
CREATE OR REPLACE FUNCTION XX_SPLIT_STRING (
p_string VARCHAR2
, p_delimiter VARCHAR2 DEFAULT ','
RETURN XX_SPLIT_TABLE PIPELINED
IS
l_idx PLS_INTEGER;
l_string VARCHAR2(32767) := p_string;
l_value VARCHAR2(32767);
BEGIN
LOOP
l_idx := INSTR ( l_string, p_delimiter );
IF l_idx > 0 THEN
pipe ROW ( SUBSTR ( l_string, 1, l_idx - 1 ) );
l_string := SUBSTR ( l_string, l_idx + LENGTH (p_delimiter) );
ELSE
PIPE ROW ( l_string);
EXIT;
END IF;
END LOOP;
RETURN;
END XX_SPLIT_STRING; -
How much ram and processing power in my imac will meet my graphic design needs?
Hi,
I'm in the market for a new imac. I'm trying to figure out how much ram I'll need and which processor will be sufficient for my graphic design needs.
I'm gonna need it to be robust enough to have InDesign, Photoshop, and Illustrator open at once along with spotify, safari with many tabs open, and a couple other apps including evernote and game from time to time. Also, I'm gonna be managing a good deal of fonts in font explorer. How much ram and processing power will I need in my imac to keep everything snappy with all these apps going at the same time?
Any advice on this would be much appreciated. Feel free to include any other relevant information you think I should know.
Thanks, NickComputers are out of date when you open the box
Ok, getting serious, that iMac should be a viable workhorse for what you want for a good five years, and taht depends on how much ram you put in it, add really fast external storage, and so on.
Didn't throw this in earlier so as to not influence the discussion: my daughter is the senior art director, VP, at a graphics design firm in NYC. Has been in the business for a number of years. When she changed out her Mac at work, bought, or company bought, the 27" iMac model just before the latest, with maxed out CPU/GPU, and storage. They maxed the memory to 32 GB for her, then added a 30" Apple cinema display so she has almost 5' of display in front of her. There is nothing she cannot have open all spread across that display area. She works almost exclusively in print media, occassionally condescends to do web stuff. And has a massive array of RAID drives hanging on it. But that is a setup an individual would be hard pressed to go with.
At home she uses a MacBook Pro with top cpu and display but that is all.
The point, just how massive do you want to go depends on how fast you have to work; in the office where time is money you need tons of horsepower. At home, you scale it to your abilitty to juggle other tasks at the same time.
I think your choices have been great, the discussion has focused on what is important and especially what can and cannot be changed in the future.
Best of luck setting this up. -
ADF how to display a processing page when executing large queries
ADF how to display a processing page when executing large queries
The ADF application that I have written currently has the following structure:
DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.Hi Steve,
After a few attempts - yes I have a hit a few snags.
I'll send you a copy of the example application that I am working on but this is what I have done so far.
I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
DataPage --> DataAction (refresh Collection) -->DataPage
I have then added this code to the (refreshCollectionAction) DataAction
protected void invokeCustomMethod(DataActionContext ctx)
super.invokeCustomMethod(ctx);
HttpSession session = ctx.getHttpServletRequest().getSession();
Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
if (nominalSearch == null)
synchronized(this)
//create new instance of the thread
nominalSearch = new ns(ctx);
} //end of sychronized wrapper
session.setAttribute("nominalSearch", nominalSearch);
session.setAttribute("action", "nominalSearch");
nominalSearch.start();
System.err.println("started thread calling loading page");
ctx.setActionForward("loading.jsp");
else
if (nominalSearch.isAlive())
System.err.println("trying to call loading page");
ctx.setActionForward("loading.jsp");
else
System.err.println("trying to call results page");
ctx.setActionForward("success");
Created another class called ns.java:
package view;
import oracle.adf.controller.struts.actions.DataActionContext;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.model.generic.DCRowSetIteratorImpl;
public class ns extends Thread
private DataActionContext ctx;
public ns(DataActionContext ctx)
this.ctx = ctx;
public void run()
System.err.println("START");
DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
//b.executeQuery();
System.err.println("END");
and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
package view;
import javax.servlet.http.HttpSession;
import oracle.adf.controller.struts.actions.DataForwardAction;
import oracle.adf.controller.struts.actions.DataActionContext;
public class ProcessingAction extends DataForwardAction
protected void invokeCustomMethod(DataActionContext actionContext)
// TODO: Override this oracle.adf.controller.struts.actions.DataAction method
super.invokeCustomMethod(actionContext);
HttpSession session = actionContext.getHttpServletRequest().getSession();
String action = (String)session.getAttribute("action");
if (action.equalsIgnoreCase("nominalSearch"))
actionContext.setActionForward("refreshCollection.do");
I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
Thanks in advance for your help
David. -
How do i skip process validations and still update the model?
how do i skip process validations and still update the model? This has got to be a bug or a really huge design flaw. And no I don't want to using 'binding' to bind to every component on my form just so I can set its value. I just want to use value binding.
Perhaps there should be a FacesContext.getCurrentInstance().updateModel() method?how about if I want clear the form or load a new model:
<h:commandButton action="#{customer.clear_action}" immediate="true" value="clear" />
<h:commandButton action="#{customer.load_action}" immediate="true" value="load" />
public void clear_action() {
Customer c = new Customer();
this.setBean("customerModel",c);
FacesContext context = FacesContext.getCurrentInstance();
context.renderResponse();
public void load_action() {
Customer c = new Customer(1000);
this.setBean("customerModel",c);
FacesContext context = FacesContext.getCurrentInstance();
context.renderResponse(); -
Clientgen with JAXWS -- how to bind with JAXB?
I'm using WLS 10.0 "clientgen" to generate Java classes from my WSDL files. All goes well for the simpler WSDL files. Since I'm new to JAXB, I don't quite understand now how to bind the output files using JAXB. It seems this would have been done in the 'clientgen' process, but I don't see any parameters for this in the documentation/help output.
Here's the ant snippet:
<target name="wsdl2java" depends="init" >
<clientgen
type="JAXWS"
wsdl="${sitedata.wsdl.file}"
destDir="${generated.class}"
serviceName="SiteData"
packageName="${output.package}.sitedata"/>
</target>
How can this be done?The <binding> child element of the WLS 10.0 wsdlc Ant task, does in fact allow you to pass a .xjb file to the wsimport Ant task. wsdlc calls wsimport internally.
When you do this, you want to do all of your namespace-to-Java-package mapping in the .xjb file, and not specify the packageName attribute on the wsdlc Ant task. In fact, doing the latter will override the mapping specified in the .xjb file.
Here's a sample Ant target that shows what this looks like:
<target name="run-wsdlc" depends="clean">
<taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask" classpathref="compile.classpath" />
<mkdir dir="${src.dir}"/>
<property name="client.binding" value="custom-client.xjb"/>
<wsdlc
type="JAXWS"
srcWsdl="etc/${wsdl.file.name}.wsdl"
destJwsDir="WebContent/WEB-INF/lib"
destImplDir="${src.dir}"
explode="false"
verbose="${verbose}"
debug="${debug}"
failonerror="true"
>
<binding dir="etc" includes="${client.binding}"/>
<classpath>
<path refid="compile.classpath"/>
</classpath>
</wsdlc>
</target>
And here's the contents of the custom-client.xjb file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bindings
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns="http://java.sun.com/xml/ns/jaxws"
wsdlLocation="DataStagingService2.wsdl"
>
<bindings
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
node="wsdl:definitions"
>
<package name="services.datastaging">
<jxb:javadoc>
<![CDATA[<body>Package level documentation for generated package services.datastaging.</body>]]>
</jxb:javadoc>
</package>
<jxb:schemaBindings>
<jxb:package name="com.acmeworld.irad.services.datastaging"/>
</jxb:schemaBindings>
</bindings>
</bindings>
The targetNamespace attribute for the DataStagingService is http://www.acmeworld.com/irad/services/datastaging. The above .xjb file says to map this to the services.datastaging Java package, but the skeleton JAX-WS service endpoint implementation class that wsdlc generates, doesn't currently honor this. The JAXB generated classes will be as specified in the .xjb file, but you'll need to manually refactor the Java package name of the wsdlc generated JAX-WS skeleton class, to be services.datastaging.
I'll be publishing a series of articles on using JAXB and JAX-WS with WebLogic 10.0, so look out for them in the coming months :-)
HTH,
Mike Wooten -
How to call a process from another project
Hi;
How to calling a process from another process in another project? Which activity that i need or web service, direct binding? I use 11gHi Tulasi ;
I have wsdl of the process i need to call. Also wsdl address on the server. But CALL activity can't use to service call. CALL activity can use only to reusable process call.
I think, this operation must make on composite.xml. But I have a same problem with this method and it don't work.
I create a base process that looking at below. It's include a direct binding. Is it include a direct binding?
[Base Process|http://d1201.hizliresim.com/t/s/21wqu.png]
Then i create a process that call to base process:
[Caller Process|http://d1201.hizliresim.com/t/s/21wqx.png]
I paste to base process' wsdl address on the server. Then i select port type (BaseProcessPortType) and a warning has occured that you see the picture above. Base Process contain Oracle SOA Composite Type. What's the wrong? It happened for Callback Port Type.
And second question is what's the Address? (under Reference Binding Setails option).
I think, i create the this direct binding correctly, i call to base process into my caller process via service activities. -
How to bind soap header using jax-rpc
To Whom It May Concern:
I am using Rad7, Ibm Websphere 6.1, on Windows XP.
I created an SoapHeader first using a string and bind it using jax-ws.
It works for jax-ws but unfortunately, my work services uses jax-rpc.
Does anybody know how to bind the soap header using jax-rpc.
Any help or hint would be greatly appreciated it.
Here is my code:
import org.apache.cxf.headers.Header;
import org.apache.cxf.headers.Header.Direction;
import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.binding.soap.SoapHeader;
import javax.xml.namespace.QName;
import java.io.StringReader;
import java.util.List;
import java.util.ArrayList;
import javax.xml.ws.BindingProvider;
@Test
public void testService() throws Exception {
try
URL wsdlURL = new URL("http://localhost:9087/abc/services/ServiceABCService");
ServiceRequestServiceService service = new ServiceRequestServiceServiceLocator();
ServiceRequestService port = service.getServiceRequestService(wsdlURL);
//How to Add Soap Header using jax-ws
String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><ABCHdrRq "
+ "xmlns=\"http://xmlns.ABCgc.net/ABC/2002/header/\" "
+ ">"
+ "<version>1.0</version><srcInfo><chType>abc</chType><chInst>0124</chInst>" +
"<appName>sSAR</appName><hostName>DW70210521</hostName><userId>fxue</userId>" +
"</srcInfo><startTimeStamp>2010-06-04T13:44:45.132</startTimeStamp><clientDt>2010-06-04T13:44:53.242</clientDt><serviceInfo><serviceName>ServiceRequestService</serviceName>" +
"<serviceFunc>addServiceRequest</serviceFunc></serviceInfo>" +
"<prevTransInfo><prevRqUID>BORS2010-06-04T13:41:10.2067f9368d1-8c5c</prevRqUID>" +
"<prevRespTimestamp>2010-06-04T13:41:10.871</prevRespTimestamp>"+
"<prevRespEndTimestamp>2010-06-04T13:41:10.902</prevRespEndTimestamp>+</prevTransInfo>"+
"</ABCHdrRq>";
SoapHeader dummyHeader1 = new SoapHeader(new QName("uri:http://xmlns.ABCgc.net/ABC/2002/header/", "ABCHdrRq"),
DOMUtils.readXml(new StringReader(xml)).getDocumentElement());
dummyHeader1.setDirection(Direction.DIRECTION_OUT);
List<Header> headers = new ArrayList<Header>();
headers.add(dummyHeader1);
((BindingProvider)port).getRequestContext().put(Header.HEADER_LIST, headers);
//How to Add Soap Header to the request using jax-ws
catch(Exception e)
System.out.println("Exception message:"+e.getMessage());
Yours,
FrustratedWell, how an attachment is processed depends on your application logic...if your application logic requires to processing attachments and verify it before processing the SOAP message, handlers could be better option.
If you need to process the attachment while processing the SOAP message, you can do it in the service implementation class.
In both the cases you need to get access to SOAPMessage object and from there get the attachments with getAttachments method. -
How to know which process is consuming high percentage of cpu?
Hi,
How to check which process is consuming high percentage of cpu ?
how to know the cpu time is atleast 80% of the elapsed time and how to know which code the process is running?
I know we can check high performance cpu can be find by TOP command
but i dont know on solaris?
please help me on this?One way is to use my Snapper script for getting the breakdown ( see http://blog.tanelpoder.com/2007/12/06/oracle-session-snapper-v106-released/ for more info ).
An example snapshot (taken over 60 second period) is below:
SQL> @snapper out,gather=tw 60 1 "select sid from v$session where type = 'USER'"
-- Session Snapper v1.07 by Tanel Poder ( http://www.tanelpoder.com )
HEAD, SID, SNAPSHOT START , SECONDS, TYPE, STATISTIC , DELTA, DELTA/SEC, HDELTA, HDELTA/SEC
DATA, 2, 20080710 11:39:18, 61, TIME, repeated bind elapsed time , 1314, 22, 1.31ms, 21.54us
DATA, 2, 20080710 11:39:18, 61, TIME, parse time elapsed , 21518, 353, 21.52ms, 352.75us
DATA, 2, 20080710 11:39:18, 61, TIME, PL/SQL execution elapsed time , 809888, 13277, 809.89ms, 13.28ms
DATA, 2, 20080710 11:39:18, 61, TIME, DB CPU , 11204956, 183688, 11.2s, 183.69ms
DATA, 2, 20080710 11:39:18, 61, TIME, sql execute elapsed time , 12441308, 203956, 12.44s, 203.96ms
DATA, 2, 20080710 11:39:18, 61, TIME, DB time , 13825800, 226652, 13.83s, 226.65ms
DATA, 2, 20080710 11:39:18, 61, WAIT, read by other session , 4432, 73, 4.43ms, 72.66us
DATA, 2, 20080710 11:39:18, 61, WAIT, log file sync , 1215135, 19920, 1.22s, 19.92ms
DATA, 2, 20080710 11:39:18, 61, WAIT, db file sequential read , 1458168, 23904, 1.46s, 23.9ms
DATA, 2, 20080710 11:39:18, 61, WAIT, enq: TX - row lock contention , 11600, 190, 11.6ms, 190.16us
DATA, 2, 20080710 11:39:18, 61, WAIT, row cache lock , 420, 7, 420us, 6.89us
DATA, 2, 20080710 11:39:18, 61, WAIT, SQL*Net message to client , 1842, 30, 1.84ms, 30.2us
DATA, 2, 20080710 11:39:18, 61, WAIT, SQL*Net message from client , 9490531, 155582, 9.49s, 155.58ms
DATA, 2, 20080710 11:39:18, 61, WAIT, PL/SQL lock timer , 35759582, 586223, 35.76s, 586.22ms
DATA, 2, 20080710 11:39:18, 61, WAIT, events in waitclass Other , 302, 5, 302us, 4.95us
DATA, 20, 20080710 11:39:18, 61, TIME, repeated bind elapsed time , 1332, 22, 1.33ms, 21.84us
DATA, 20, 20080710 11:39:18, 61, TIME, parse time elapsed , 21439, 351, 21.44ms, 351.46us
DATA, 20, 20080710 11:39:18, 61, TIME, PL/SQL execution elapsed time , 799773, 13111, 799.77ms, 13.11ms
DATA, 20, 20080710 11:39:18, 61, TIME, DB CPU , 11303744, 185307, 11.3s, 185.31ms
DATA, 20, 20080710 11:39:18, 61, TIME, sql execute elapsed time , 12404247, 203348, 12.4s, 203.35ms
DATA, 20, 20080710 11:39:18, 61, TIME, DB time , 13792389, 226105, 13.79s, 226.1ms
DATA, 20, 20080710 11:39:18, 61, TIME, sequence load elapsed time , 752, 12, 752us, 12.33us
DATA, 20, 20080710 11:39:18, 61, WAIT, log file sync , 1228759, 20144, 1.23s, 20.14ms
DATA, 20, 20080710 11:39:18, 61, WAIT, db file sequential read , 1339772, 21963, 1.34s, 21.96ms
DATA, 20, 20080710 11:39:18, 61, WAIT, row cache lock , 395, 6, 395us, 6.48us
DATA, 20, 20080710 11:39:18, 61, WAIT, SQL*Net message to client , 1901, 31, 1.9ms, 31.16us
DATA, 20, 20080710 11:39:18, 61, WAIT, SQL*Net message from client , 9496607, 155682, 9.5s, 155.68ms
DATA, 20, 20080710 11:39:18, 61, WAIT, PL/SQL lock timer , 35786481, 586664, 35.79s, 586.66ms
DATA, 20, 20080710 11:39:18, 61, WAIT, events in waitclass Other , 96, 2, 96us, 1.57us
Tanel Poder
http://blog.tanelpoder.com -
I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
1. Party (PartyId, Name)
2. Case (CaseId, CaseNo)
3. Petitioner (CaseId, PartyId) ............. Link Table
I am completely new to .Net and to begin with I download Microsoft's sample application and
following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
users can choose one from the dropdown list to add or edit the petitioner.Hello Barry,
Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
the sample available at the link you supplied.
To get the idea of the thing here is my code behind of a view vBoxPetitioner:
<UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:v="clr-namespace:CCIS.View.Case"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
d:DesignWidth="300"
d:DesignHeight="200">
<UserControl.Resources>
<DataTemplate DataType="{x:Type vm:vmPetitioner}">
<v:vPetitioner Margin="0,2,0,0" />
</DataTemplate>
</UserControl.Resources>
<Grid>
<HeaderedContentControl>
<HeaderedContentControl.Header>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Margin="2">
<Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
| <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
</TextBlock>
</StackPanel>
</HeaderedContentControl.Header>
<ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
</HeaderedContentControl>
</Grid>
</UserControl>
This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
Here is the code of vmPetitioner, a ViewModel:
Imports Microsoft.VisualBasic
Imports System.Collections.ObjectModel
Imports System
Imports CCIS.Model.Party
Namespace CCIS.ViewModel.Case
''' <summary>
''' ViewModel of an individual Email
''' </summary>
Public Class vmPetitioner
Inherits vmParty
''' <summary>
''' The Email object backing this ViewModel
''' </summary>
Private petitioner As tblParty
''' <summary>
''' Initializes a new instance of the EmailViewModel class.
''' </summary>
''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
Public Sub New(ByVal detail As tblParty)
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Me.petitioner = detail
End Sub
''' <summary>
''' Gets the underlying Email this ViewModel is based on
''' </summary>
Public Overrides ReadOnly Property Model() As tblParty
Get
Return Me.petitioner
End Get
End Property
''' <summary>
''' Gets or sets the actual email address
''' </summary>
Public Property fldPartyId() As String
Get
Return Me.petitioner.fldPartyId
End Get
Set(ByVal value As String)
Me.petitioner.fldPartyId = value
Me.OnPropertyChanged("fldPartyId")
End Set
End Property
End Class
End Namespace
And below is the ViewMode vmParty which vmPetitioner Inherits:
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports CCIS.Model.Case
Imports CCIS.Model.Party
Imports CCIS.ViewModel.Helpers
Namespace CCIS.ViewModel.Case
''' <summary>
''' Common functionality for ViewModels of an individual ContactDetail
''' </summary>
Public MustInherit Class vmParty
Inherits ViewModelBase
''' <summary>
''' Gets the underlying ContactDetail this ViewModel is based on
''' </summary>
Public MustOverride ReadOnly Property Model() As tblParty
'''' <summary>
'''' Gets the underlying ContactDetail this ViewModel is based on
'''' </summary>
'Public MustOverride ReadOnly Property Model() As tblAdvocate
''' <summary>
''' Gets or sets the name of this department
''' </summary>
Public Property fldName() As String
Get
Return Me.Model.fldName
End Get
Set(ByVal value As String)
Me.Model.fldName = value
Me.OnPropertyChanged("fldName")
End Set
End Property
''' <summary>
''' Constructs a view model to represent the supplied ContactDetail
''' </summary>
''' <param name="detail">The detail to build a ViewModel for</param>
''' <returns>The constructed ViewModel, null if one can't be built</returns>
Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Dim e As tblParty = TryCast(detail, tblParty)
If e IsNot Nothing Then
Return New vmPetitioner(e)
End If
Return Nothing
End Function
End Class
End Namespace
And final the code behind of the view vPetitioner:
<UserControl x:Class="CCIS.View.Case.vPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
Width="300">
<UserControl.Resources>
<ResourceDictionary Source=".\CompactFormStyles.xaml" />
</UserControl.Resources>
<Grid>
<Border Style="{StaticResource DetailBorder}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Petitioner:" />
<ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
</Grid>
</Border>
</Grid>
</UserControl>
The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
what I need to Know is how to route the binding path if it exists in a different ViewModel?
Sir, I look forward to your early reply bringing a workable solution to the problem I face.
Warm Regards,
Arun -
How to do parallel processing with dynamic internal table
Hi All,
I need to implement parallel processing that involves dynamically created internal tables. I tried doing so using RFC function modules (using starting new task and other such methods) but didn't get success this requires RFC enabled function modules and at the same time RFC enabled function modules do not allow generic data type (STANDARD TABLE) which is needed for passing dynamic internal tables. My exact requirement is as follows:
1. I've large chunk of data in two internal tables, one of them is formed dynamically and hence it's structure is not known at the time of coding.
2. This data has to be processed together to generate another internal table, whose structure is pre-defined. But this data processing is taking very long time as the number of records are close to a million.
3. I need to divide the dynamic internal table into (say) 1000 records each and pass to a function module and submit it to run in another task. Many such tasks will be executed in parallel.
4. The function module running in parallel can insert the processed data into a database table and the main program can access it from there.
Unfortunately, due to the limitation of not allowing generic data types in RFC, I'm unable to do this. Does anyone has any idea how to implement parallel processing using dynamic internal tables in these type of conditions.
Any help will be highly appreciated.
Thanks and regards,
Ashintry the below code...
DATA: w_subrc TYPE sy-subrc.
DATA: w_infty(5) TYPE c.
data: w_string type string.
FIELD-SYMBOLS: <f1> TYPE table.
FIELD-SYMBOLS: <f1_wa> TYPE ANY.
DATA: ref_tab TYPE REF TO data.
CONCATENATE 'P' infty INTO w_infty.
CREATE DATA ref_tab TYPE STANDARD TABLE OF (w_infty).
ASSIGN ref_tab->* TO <f1>.
* Create dynamic work area
CREATE DATA ref_tab TYPE (w_infty).
ASSIGN ref_tab->* TO <f1_wa>.
IF begda IS INITIAL.
begda = '18000101'.
ENDIF.
IF endda IS INITIAL.
endda = '99991231'.
ENDIF.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = pernr
infty = infty
begda = '18000101'
endda = '99991231'
IMPORTING
subrc = w_subrc
TABLES
infty_tab = <f1>
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
subrc = w_subrc.
ELSE.
ENDIF. -
How to call BPEL process in JSP page
Hi
I am new to BPEL.please help me how to call BPEL process in JSP page.
Thank You...Check this thread ....
How can i call asyncronous BPEL process from Java Class????
Tom.. -
How to bind a UI element to the context
Hi Experts,
I have a problem binding UI element to the context. In my code i have to create TabStrips dynamically and under this tabstrip number of UI elements would be there. For this i have a code like this..
IWDTransparentContainer theActionContainer =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDTabStrip ts = (IWDTabStrip) view.createElement(IWDTabStrip.class,"TabStrip");
IWDTab tab1 = (IWDTab) view.createElement(IWDTab.class,"Tab1");
IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
IWDCaption header1 = (IWDCaption) view.createElement(IWDCaption.class,"Header1");
header1.setText("Tab1");
tab1.setContent(in);
ts.addTab(tab1);
IWDTab tab2 = (IWDTab) view.createElement(IWDTab.class,"Tab2");
IWDInputField in2 = (IWDInputField) view.createElement(IWDInputField.class,"in2");
IWDCaption header2 = (IWDCaption) view.createElement(IWDCaption.class,"Header2");
header2.setText("Tab2");
tab2.setHeader(header2);
ts.addTab(tab2);
theActionContainer.addChild(ts);
<b>when i run this code it is giving following exceptions..</b>
The initial exception that caused the request to fail, was:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
... 63 more
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripItemContentFragment(TabStripRenderer.java:1867)
at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripFragment(TabStripRenderer.java:838)
From these exceptions what i understood is, i need to bind these UI elements to context.
Can any body tell me how to bind a UI element to the context if I understood the exceptions correct..
Thanks in Advance,
Murthy.HI,
lets say Ctx is your context attribute,
IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getAttribute("Ctx");
then , as per your code,
IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
<b>in.bindValue(attrInfo);</b>
if your contex attribute is child of some other node then do like this,
IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getChildNode("SalesOrder",0)getAttribute("Ctx");
//this is when Ctx is child of node SalesOrder, and we are taking Ctx from its 0th element
then ,
IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
<b>in.bindValue(attrInfo);</b>
include this in your code ,
let me know if you face any problem
regards
reward points if it helps
Maybe you are looking for
-
Sony v1u camera's hard drive recorder and fcp 6
I bought the hard drive recorder with the V1U HDV Sony camera. The files called M2T's i think are not supported by FCP. Do you know if they are in the FCP 6? Or if the 24pA setting still has to go through a CinemaTools reverse telecine to be seen.
-
Nodes and Subnodes in a Structure of SOLMAN
Hi Gurus, Please let me know the procedure how to create Nodes and Subnodes in a Structure of SOLMAN. Structure Node A Sub Node 1 Subnode 2 Node B Sub node 3 Sub node 4.. etc.. Thanks and regards, Varun
-
Mass Upload of PFCG Roles and Transactions
Hey Guys, I have done the recording of PFCG. i have given 1)Role Name 2)Desc 3)MENU tab ADD Transaction pop up opens for entering the Transactions 4)i have added 2 transactions in my recording. vl02n vl03n i have DOwnlaoded the Template From Test
-
Hi, I am looking for Datamodel of Order Management. Can anybody tell me how to find the like. Thanks Mehdi
-
How can I creat or open an excel file in labview?
I am using Labview 7.1 and report generation toolkit. I got the example code from this address :"Creating a report in Microsft excel using the labview report generation toolkit" But seems this example only can creat report when the excel file exist,