In a single JVM the objects can pass-by-value ?
what happen when a bean call to another bean which already deployed in the same container?
how many JVMs in a container?
"I thought parameters were all pasted by value because Java doesn't support pointers?"
Incorrect assumption.
Java doesn't let you fiddle with pointers, but effectively all object variable references are pointers (not exactly though). If you are working in a single JVM all params are passed by value, but when you think you are passing objects you are really passing object references, so it is they (the object references) that are passed by value.
Within the scope of EJB, objects (not the references) are passed by value because we are talking about remote method calls. Since calls are assumed to be between separate JVMs the object state must be copied across the wire.
In the case of an EJB calling another within the same JVM, the parameters passed must still be passed by value since the receiving code may rightfully assume there is no shared object state (the implementation could be pass-by-ref as long as the container could somehow support the above assumption, not very likely).
Similar Messages
-
Revision: 17772
Revision: 17772
Author: [email protected]
Date: 2010-09-20 15:02:50 -0700 (Mon, 20 Sep 2010)
Log Message:
Update the url in the tests to use a relative path instead of the default localhost:8400 so that the tests can pass on appservers other than the default Tomcat.
Modified Paths:
blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationFalseTest/Remoting_NetConnectionTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationTrueTest/Remoting_NetConnectionTest.mxmlRevision: 17772
Revision: 17772
Author: [email protected]
Date: 2010-09-20 15:02:50 -0700 (Mon, 20 Sep 2010)
Log Message:
Update the url in the tests to use a relative path instead of the default localhost:8400 so that the tests can pass on appservers other than the default Tomcat.
Modified Paths:
blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationFalseTest/Remoting_NetConnectionTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/EnforceEndpointValidation/Enforc eEndpointValidationTrueTest/Remoting_NetConnectionTest.mxml -
What are all the objects can be imported and exported...
Hi all,
what are all the objects can be imported ..
and what are all objects exported....in XI..
and what is context objects and logical routing..
Cheers,
RaghaveshHi,
Your question 1 is not very clear. Are you taking about Export and Import under TOOLS --> EXPORT / IMPORT? If yes, all objects created in the IR and ID can be exported and improted. They are used for moving your objects from one environement to another .TPZ files.
Individual Objects that can be improted in the IR are those that come under
1. External Definitions --> XSD, WSDL, DTD which acts
as the message types.
2. Idocs and RFC's.
3. Imported Archives -->External Mapping progrars ( Java and XSLT ) , external .jar files etc.
Context objects is nothing but to put in simple words an XPATH. At times XPATH can become too long and complex and to avoid typing them at different places, you create CONTEXT Objects for these path and then use them.
Logical Routing refers to Conditional Receievr / Interface Determination where on the basis on some conditoon your target Recievr / Interface is determined.
Regards,
Bhavesh -
Vega4 "Life is Beautiful" Single of the Week: Can't Download
When I try to download this weeks single of the week I get this message:
"Purchase of this item is not currently available
This item is being modified. Please try again later."
What's going on here? I've been trying to get this free single since it was released yesterday.
Thanks!There might be a problem with the server that covers your area not properly synchronizing. I'd suggest you contact the iTunes Store customer support department through the form at the bottom of their web page and let them know about the problem.
-
Need impl of a map which adds the object to an existing value
Hi
I want to create a Map with the key as 'Integer"'
The value should be a 'Queue' (or List) of Object 'Sample'.
The key value (Integer) is present in the 'Sample' object. This key id not unique for 'Sample' object.
When I add a 'Sample' to the map, it should add to the corresponding queue in the Map, based on the value of that field in the 'Sample' object.
Is there any such Collection in API? so that I don't have to write the custom implementation. I am ok with Apache Collection also.
Regards
SSHi
I want to create a Map with the key as 'Integer"'
The value should be a 'Queue' (or List) of Object
'Sample'. Following you so far. Just use a Map.
The key value (Integer) is present in the 'Sample'
object. This key id not unique for 'Sample' object.
When I add a 'Sample' to the map, it should add to
the corresponding queue in the Map, based on the
value of that field in the 'Sample' object.Lost you here, what you mean is present in the Sample object? What do you mean not unique? I thought you were added lists to a map not samples? You might want to post some code of this Sample object??? -
No Pass-by-Value or Copy Constructors
After having used AS3 for some months now, I've realized that
there is no pass-by-value option when passing variables into
functions. The only option is pass-by-reference. Similarly, there
are no default copy constructors. So, if I want to create a copy of
an object, I have to write code to create a new instance of the
object and manually copy all of the source variable's properties to
the new target object.
This lack of a pass-by-value mechanism and copy constructors
leads to some confusing behavior and necessitates writing quite a
bit of extra code. A common case involving confusion is when a
function call changes a property of a passed-in object. The caller
might assume that the object will not be modified and then be
surprised when it is. This is especially likely to happen when
different people are working on the caller and the callee. It
shouldn't be necessary for the caller to be concerned about the
internal workings of an object being used but, because there is no
pass-by-value mechanism, the caller often must take this into
account.
Because of the lack of a pass-by-value mechanism the onus is
on the person writing a function to always make a copy of passed-in
objects if they are going to be modified. Unfortunately, the lack
of default copy constructors makes this an onerous task. The only
way to copy an object is to write code to create a new object and
then copy each property of the object. Where the properties are
objects themselves a deep copy is needed and the amount of code can
become large and the task tedious. To do this amounts to writing a
set of copy constructors for each object and sub-object - each time
a variable is accessed for modify.
To make matters worse, it's not even possible to write a copy
constructor for user-created classes. Consider the following
attempt at writing a copy constructor to copy two instance
variables for a custom Form class:
public function Form(f:Form) {
this._textHeight = f._textHeight;
this._actionURL = f._actionURL;
This causes a "Duplicate function definition" compile error
because a default constructor already exists.
Pass-by-value and built-in copy constructors are standard
features in most OOP languages and their lack in AS3 is a glaring
omission. I hope Adobe will seriously consider adding them to the
next version of ActionScript.Nitin_Mathur wrote:
at one time i had doubted my own conceptsNote that the type of a parameter may be different from the type of the object you created. However, it is still the same value that is passed, as pointed out by this example:
public class Test {
public Test() {
//an object of type "MyClass" is created on the heap with the "new" operator:
MyClass myClass = new MyClass();
doSomething(myClass);//the reference to the object is passed by value
private void doSomething(MyInterface myInterface) {
//the passed value is a reference to a "MyClass" object,
//but here it is considered to be a "MyInterface" object
//and we don't have access to the "MyClass"-method "testClass()"
myInterface.testInterface();
public static void main(String[] args) {
new Test();
interface MyInterface {
public void testInterface();
class MyClass implements MyInterface {
public void testInterface() {
System.out.println("testInterface");
public void testClass(){
System.out.println("testClass");
} -
Objects - Pass by refrence or pass by value ----Confusion
Hii Javaties
I have confuison regardhing whether objects are passed by value or refernce -----------------------------------------------------
i have a function ( test() ) that calls
another function ( change(Test_Bean) ) which takes a bean as a parameter.
If in this calling function i change the value of the bean , then the value of bean is actually altered in calling function .
function change(Test_Bean)
test_bean.setName("Peter");
function test()
Test_Bean test_bean=new Test_Bean();
test_bean.setName("Tom");
change(test_bean);
System.out.println("Name ="+ test_bean.getName());
/* Name = Peter is printed */
}Can anybody tell me why is this so ?Your code demonstrates the proper functioning of pass
by value. You altered the state of an object by using
the correct method. That has nothing to do with
attempting to reassign the reference which would be
pass by reference and you can't do.If this is pass be value , then how can i change the value of original copy ?
If i am using the correct method to alter the state , then it sould alter the state of the local copy not the of original object.
I am still confused ....... -
Passing multi value parameter to the Drill through report
Hi
I have two reports say Report A and Report B.
Both reports using same parameters.
I am Navigating from Report A to Report B using Jump to Report option.
Now when I pass multiple parameter to the Report B it only displays first parameter results.
In report B I have parameter multi value select to true.
I would like to know if its possible or not to pass multi value parameter in drill through report?
I would appreciate if someone can help me here.
Regards
AmitYes you can pass multi value parameters to a drill through report.
It works similar to multi value parameters for subreports, which is discussed in detail in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163803&SiteID=1
-- Robert -
Need to sort an object array using an element in the object.
hi all,
i need to sort an object array using an element in the object.can someone throw some light on this.
Edited by: rageeth on Jun 14, 2008 2:32 AM[http://java.sun.com/docs/books/tutorial/collections/interfaces/order.html]
-
How to pass date value to an UDF
Hi,
I am working in SDK UI. I have created a form. In this form there is a edit text box. I have to pass a date value to that object. I have taken a variable and pass a date value in "yyyy/mm/dd" format. When I am assign this variable to the object to pass the date value to that object then I am getting an error. The error is "Unable to cast object of type 'system.string' to 'system.IFormatProvider' ".
I have written the code like this :------>
Dim AtenDate As String
AtenDate = '2007/08/01' ' format "yyyy/mm/dd"
Dim txtEditDt As SAPbouiCOM.EditText
oItem = oForm.Items.Item("11")
txtEditDt = oItem.Specific
txtEditDt.String = AtenDate.ToString("dd/MM/yyyy")
After the last line the error is getting fire.
Please help me how I can pass the date value to that object.
Please help me. It is very urgent.Date and Double conversion is really a confusing thing in B1-SDK programming in the beginning.
But once you got it it's okay.
When working with date-time and doubles (System and SBO-Price/SBO-Quantity), you should always take care about the language of...
...system (windows)
...SBO User Interface
These two formats could make trouble when the programming has been made only for a specific configuration of these two.
The third format for SDK-Programming is
...the SBO-DB-Format, which is language-independent and always a String
Here are some rules:
<b>EditText.String</b> ALWAYS returns the value you see on the SBO GUI. It depends on the SBO Date, Price etc.-Format the USER has configured in the Administration. Consider that the user has (for example) the possibility to choose a "#" (or whatever) as decimal-seperator. Direct (implicit) conversion of such a string to a double will fail at the latest now.
The savest way to get a .NET-Double or DateTime- Value from EditText.String are the conversion methods of SBOBobs-Object (see SDK-help -> BoBridge, Format_MoneyToString...etc.).
I think it's a good idea to write some wrapper functions for that methods, cause they always need a recordset which blows up the code too much.
<b>EditText.Value</b> always (system/sbo-language independent) returns the value as a String in DB-Format (Double as "12345.126700" and date as "20070930".
For that you must asure that the EditText is bounded to a format-corresponding datasource. Price, Quantitiy.... if you need a double.
If your "price"-field would be bound to ShortText and the user wants (assuming the example from above) a "#" for decimal-point, then a GUI-seen value like "12,421#12" is also returned as "12,421#12" by EditText.Value. But If bound to Price-DataSource it's "12421.120000"
=> So always do a DataBind to the Data - Type which is needed is recommended for this to work!
In my case EditText.String and -Value is mostly (only...? needed for B1-System-Forms where using of DataSources is restricted.
The prefered way of read/write values is the
<b>UserDataSource.ValueEx and DBDataSource.GetValue/SetValue</b>-method. It's also always in DB-Format as EditText.Value before, but gives much more performance.
Once you got some conversion-functions for "DB-Format-String" to ".NET-DataType" and vice verca (I've defined some .NET - System.Globalization.XXXFormatInfo-Objects for that) all of your problems are things of the past
Regards,
Roland
null
Message was edited by:
Roland Toschek
Edited by: Roland Toschek on Jan 22, 2008 5:32 PM
Trying to clarify a sentence -
About passing multiple values in parameter for oracle report
https://docs.google.com/file/d/0B0dx7wf68mD0QzdpbWU4UGNURTQ/edit
Hi all,
i want to pass multiple value using , to separate them 1,2,3....
here is my query
SELECT DISTINCT
oh.header_id
,oh.org_id
,to_char(oh.ordered_date,'DD-MON-YYYY') d_date
,to_char(oh.ordered_date+31,'DD-MON-YYYY') d_validity
,oh.ship_to_org_id
,oh.invoice_to_org_id
,oh.cust_po_number d_po_num
,rcust.customer_id AS customer_id
,oh.order_number d_salesorder_no
,oh.cust_po_number d_project
,oh.attribute1 second_addr
,oh.attribute2 remark1
,oh.attribute3 remark2
,substr(oh.transactional_curr_code,1,3) as currency
,tyl.name ordertype
,oh.salesrep_id
,rat.name as d_payment_term
,rat.description d_payment_desc
,rsa.name
,rsa.email_address as sales_phone
,rcust.customer_name||' - #'||rcust.customer_number d_to_custname
,rcust.customer_name d_cust_sign
,rcust.attribute1
,rcust.customer_number
-- ,raddr.ship_to_flag
,oh.sold_to_contact_id AS attn_id
,rcust.party_id
,tyl.name AS SO_type
-- ,net_org.ORG_LOGO
FROM
oe_order_headers_all oh
,ra_customers rcust
,ra_addresses_all raddr
,ra_site_uses_all rsite --double_line
,ra_terms rat
,hz_party_sites hps
,hz_contact_points hcp
,ra_salesreps_all rsa
,oe_transaction_types_tl tyl
-- ,apps.ar_contacts_v acv
-- ,net_org
WHERE oh.sold_to_org_id = rcust.customer_id
AND oh.payment_term_id = rat.term_id(+)
--AND rcust.customer_id = acv.customer_id(+)
AND oh.salesrep_id = rsa.salesrep_id
AND oh.order_type_id = tyl.transaction_type_id
AND rcust.party_id = raddr.party_id
AND raddr.address_id = rsite.address_id
AND rcust.party_id = hps.party_id
AND hps.party_site_id = hcp.owner_table_id(+)
AND hcp.owner_table_name(+) = 'HZ_PARTY'
--AND hcp.contact_point_type (+)='PHONE'
AND tyl.LANGUAGE = userenv('LANG')
--AND raddr.ship_to_flag IS NULL
AND upper(tyl.name) in ('SW SALES CONTRACT','SW-NSC SALES CONTRACT','TILES SALES CONTRACT','VBP SAMPLE ORDER', 'VBP INTERNAL ORDER')
AND oh.order_number =:P_CONTRACT_NO
and oh.org_id = :P_ORG_ID
--and net_org.org_id = :P_ORG_ID
&CP_Param
and after para form
function AfterPForm return boolean is
begin
:CP_Param := 'where oh.order_number in ('||:P_CONTRACT_NO||')';
return (TRUE);
end;
it said ora-00933 but my query can run i dont need the multiple values para, can anyone help me how to modify the report so it can pass multipel values thanksHI I tried changing the parameter width to a larger value, it can output , and the field where I show the order_number i used source P_CONTRACT_NO,
it will display as 102005000,102005001 and I also tried using the column from the query directly, it will be separated , it has some other problem
I have the header part and main part,
and also there are page numbering, with the order number field set as order_number it will output single number , but the page order is wrong
102005000,102005001 will be like header page: 102005000 1/4 102005001 2/4, main page 102005000 3/4, 102005001 3/4
DO you have any idea how I can set the page numbering setting so it will output as header page:102005000 1/2 102005000 2/2
header page:102005001 1/2 102005001 2/2
?? thanks -
APEX 4.0.2 Multi-selection on a cascade LOV select list only pass 1 value
Hello everyone,
I am struggling to make a cascading LOV select list has multi-selection.
On one report page.
I have 2 select list
The first one lists the court name (P4_COURT_NAME), the second one (P4_DEFENDANT) list all defendants who currently engaged in the court.
The problem is when I allow the defendant select list become multi-select, when it submit it only pass the first selected value.
So I create just a simple select list based one list of value, and make it allow multi-selection. When it submit, the normal select list can pass selected values properly, while the cascade LOV select list pass only the first selected value.
Please help if any of you have an idea why.
We use APEX 4.0.2.00.07, Oracle data version iis 11g
The some configuration settings I set for the P4_DEFENDANT IS
Value required: Yes
Page Action When value changed: None
Allow Multi Selection: Yes
Named LOV: --Select Named LOV-
Display Extra value : Yes
Display Null Value: Yes
Null Display Value: --Select—
Null return value:
Cascading LOV Parents Items: P4_COURT_NAME
Page Items to Submit: P4_DEFENDANT
Optimize refresh: YES
List of value definition
SELECT def.first_name || ' ' || def.surname || ' (PRN: ' || def.prn || ' )' as d, def.def_id as r
FROM defendant def INNER JOIN court_engagement ce
ON def.def_id = ce.defendant_id
WHERE (ce.date_joined_aodt_court IS NOT NULL
AND (ce.date_terminated IS NULL OR to_date(ce.date_terminated,'dd/mm/yyyy') > to_date(sysdate,'dd/mm/yyyy'))
AND UPPER(ce.court_name) LIKE UPPER(:P4_COURT_NAME)
AND ce.active = 1)Source Used: Only when current value in session state is null
Source Type: Static Assignment
Maintain session state: Per session
The rest is default.
Thanks in advance.
AnnHi Chintan,
The "Source used" for those items are "Always, replacing any value in the session state". To set them to "Only when current value in session state null" sounds a good solution to me.
However, a strange thing just happened - now I will not lose the values of the items after the page reloading, although I have changed nothing in the page in my application since I asked the question. I don't understand why all of a sudden the reloading doesn't make me lose changed values any more. Let me dig it tomorrow to see what I'll find.
Thanks so much for your help.
Christine -
Pass al values of field - go to report
Hello, I need to pass all values of a field inestead of First or Last in Action.
I have the parent report with no paramenters. I have enbled a text box to go to other report that acepts parameters. However I can only pass the First or Last value. How I can pass all values?
For example, I have got this table. The names of computers of server. If we click on blue number (CountDisntinct) we go to other report.
If I execute the report we have got this:
If I click on number 3 I need to pass the three names to other report which show more details about these Computers. If I click on128
I need to pass 128 names of computers. How I can pass these names?
Thanks!Ok, thanks! And is it possible to pass all values of a field? I have this problem in this report.
If I click ontotal of server(For example
6) I only pass Server but If I click on Name (for example
1 or
5) I need to pass Server and Item. If I do this it fails because can not pass diferents elemts to other report.
How I can pass these names of computers? Is there solution?
Thanks! -
Trouble escaping quotes so I can use arraylist values to get recordsets
My app is being built in tiny little baby steps.....
Thanks to the kind folks on this forum, I've modified the constructor for a class I have to accept an arrayList rather than series of strings. The relevant parts of the class are below.
Now, when I construct this class, instead of sending something like
chsShape(arraylistValue1,arraylistValue2,arraylistValue3...)
I need to construct it with infor pulled from a database. I previously had stuff hardcoded like the following, and it worked: chsShape(rs.getString("arraylistValue1"),rs.getString("arraylistValue2"),rs.getString("arraylistValue3...)")
You can see in the code below that I'm trying to escape the quotes so that they can be interpreted correctly to get info from the db. The result is that the quotes are not escaped, and my output has values like rs.getString(\"arraylistValue1\")
So once again, I am forced to turn to you ever-helpful folks.
public class chsShape {
public ArrayList setInfo;
public ArrayList getInfo() {
ArrayList fields=new ArrayList();
for (int x=0;x<setInfo.size();x++){
fields.add("rs.getString(\\\""+setInfo.get(x)+")\\\"");
return ((ArrayList)fields);
}McMahonM wrote:
I was just indicating that I hadn't heard of (or thought of) a constructor taking a resultset.
Did my previous post outlining valid content for my chsShape construction help you understand what I'm trying to do any better?
I'm happy to elaborate on anything else you might need to know.
Thanks so much for helping!Yes, I understand now. I suggest doing either of the following:
Either pass it values:
new ChsShape("Vancouver","Map 1", "2,250,000,000","Starbucks") //classes should always start with a capital letter, BTWThose values wouldn't be hard coded, so that will actually look like:
String city = ...
String somethingElse = ...
String population = ... //why is population a String?
String store = ...
ChsShape shape = new ChsShape(city, somethingElse, population, store);If there is some reason you want to pass it a list (I don't see the reason, myself):
String city = ...
String somethingElse = ...
String population = ... //why is population a String?
String store = ...
List<String> list = new ArrayList<String>();
list.add(city);
list.add(somethingElse);
list.add(population);
list.add(store);
ChsShape shape = new ChsShape(list); -
How to pass Z values to workflow.
Hi all,
I would like to pass values of a Z table to step of workflow, specifically to condition step. I need to pass the entries values defined in Z table to compare material group of REQREQ to them.
Is possible it?
is there another solution to do it?
Many Thanks.
Regards,
David.Hi David,
I am not sure what your exact requirement is, but to access the Ztable you can follow this approach. Create an Activity task in workflow and make a call to a BO method. In this method query the Ztable to fetch the values to be used in the workflow. Pass these values in the export parameter of the BO method.
Access the parameter in a multiline workflow container element and then use it in the workflow where ever desired.
Hope this helps!
Regards,
Saumya
Maybe you are looking for
-
"View All RSS Articles" Sometimes Stops All Pages from Loading
Hi! I'd like some help with this: Sometimes, when I view a whole lot of RSS articles in one tab, the content stops loading after one hundred or so articles have come in. After this, no pages will load -- not even a local html file in my home director
-
Is there a way to remove a painting on a wall in a shot?
a couple walk by a wall with a painting hanging behind them. is there a way to remove it? like copy a blank space and paste it on the painting? something like that possible? do i have to go frame by frame? its like 15 total seconds...
-
Row level security problem.
Hy all, I'm new to Oracle and though i've google it a lot I didn't manage to find a solution to this problem: I'm using sql developer and Oracle 10g. I have this two tables : CREATE TABLE HR_employees (codHR NUMBER(3) CONSTRAINT pk_hr PRIMARY KEY, co
-
Does Weblogic Server 5.1 supports RedHat Linux 7?
Does Weblogic Server 5.1 supports RedHat Linux 7? Thanx in advance.
-
IOS 5.0.1 update is terrible
Just after iOS 5.0.1 update every 2 mins of usage of browser brings down by battery by 1%. I had no problems with iOS 5. I don't why Apple release 5.0.1 update without much of testing. I wonder if Apple will be like RIM soon. Steve wouldn't have rele