How to serailize Object
hi
i am using JMS and i want ot use
message.setObject(Object )
but this object must be serialized before passing to setObject() method.
i have Object type but i cant able to put it in mesage as it is not serialize
so how can i serialize this object.
public boolean SendSync(Object body)
if (sendTo == null)
return false;
if (body != null && session != null )
message.setObject(body);
Regards
Praveen
Cast it to Serializable. If it isn't Serializable you will then get a ClassCastException. In which case you are hosed unless you can get the class to implement Serializable.
Similar Messages
-
How to show object creation in UML
How to show object creation in UML
In a sequence diagram, it's a line (with arrow) pointing to the new object and the <creates> or <new> tag as mentioned above.
| obj 1 |
|
| <creates> ----------
| --------------> | obj 2 |
| ----------or----------
| obj 1 |
|
| <new> ----------
| --------------> | obj 2 |
| ---------- -
How to "get object" -- ResourceBundle
According to the ResourceBundle API:
ResourceBundle myResources = ResourceBundle.getBundle("MyResources");Besides getString, ResourceBundle also provides ... a generic getObject method for any other type of object. When using getObject, you'll have to cast the result to the appropriate type. For example:
int[] myIntegers = (int[]) myResources.getObject("intList");
{code}
Elsewhere,
+getBundle+ attempts to locate a property resource file.
Does it make sense/Is it possible to +getObject+ from a property resource file? If so, how is the object "expressed" in the property resource file?
For example, if the resource file looks like
1=Person
then the key 1 is associated with the String "Person"
If
[code]class Person {
String firstName;
String lastName;
... }[/code]
is it possible to associate "1" with a Person object, where firstName is "Foo" and lastName is "Bar"?
If so, how would it look in the property resource file?
Thanks in advance,
CIn the resource file, you can save the data like this:
numberofperson=2
firstname1=Foo
firstname2=dummyfirst
lastname1=Bar
lastname2=dummylast
For programming, you can code like this:
public class Person{
private String firstname;
private String lastname;
public Person(String firstname, String lastname){
this.firstname = firstname;
this.lastname = lastname;
int personNum = Integer.parseInt(myResources.getString("numberofperson"));
Person personArr[] = new Person[personNum];
for (int i=1; i<personNum; i++){
personArr[i] = new Person(myResources.getString("firstname"+i),myResources.getString("lastname"+i));
} -
How to create objects in ABAP Webdynpro?
Hi,
I want to create the object for the class: <b>CL_GUI_FRONTEND_SERVICES.</b>
then i want to call file_save_dialog method.
how shoud i write the code, plz?I have written this code:
v_guiobj TYPE REF TO cl_gui_frontend_services.
<u> ?????????????</u>
v_guiobj->file_save_dialog( ...).
How to create object in the place of ?????????????.
Bcoz, when i run this i am getting:
<b>Access via Null object reference not possible.</b> -
How to delete object in Integration Repository SAP PI 7.0
how to delete object in Integration Repository SAP PI 7.0
Hi Rashmi,
Right click on the object, you would find the option to delete--> select it. Goto Changelist Tab and activate the changes.
Ref: /people/siva.maranani/blog/2005/05/22/how-to-delete-software-component-from-integration-builder
Re: How to delete/remove the software component from integration repository
Thanks, -
Revision: 15505
Revision: 15505
Author: [email protected]
Date: 2010-04-16 09:29:26 -0700 (Fri, 16 Apr 2010)
Log Message:
Fix image smoothing, which had been broken as a result of some changes to how the display object of an ImageElement is exposed. Add integration test.
Modified Paths:
osmf/trunk/framework/OSMF/org/osmf/elements/ImageElement.as
osmf/trunk/framework/OSMFIntegrationTest/org/osmf/elements/TestImageElementIntegration.asThat's a comment in the file. It has no effect at all.
-
How to transport objects from one server to another server?
How to transport objects from one server to another server.ie..from development to testing sewrver....
Hi Manoj,
Check these links
http://help.sap.com/saphelp_nw2004s/helpdata/en/93/a3a74046033913e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/a8/5e56006c17e748a68bb3843ed5aab8/frameset.htm
Transporting Objects IR ID using CMS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f85ff411-0d01-0010-0096-ba14e5db6306
http://help.sap.com/saphelp_nw2004s/helpdata/en/e1/69a740aa053a13e10000000a155106/frameset.htm
You can choose either File transfer methor or CMS. File transfer method is the simplest.
Sachin -
"a"+"b"+"c", how many String objects created?
Hello everyone,
String s = "a" + "b" +"c";
How many String objects are created?
I guess 5, is it right?
regards> How many String objects are created?
>
I guess 5, is it right?
Nope. Just one. -
How to unlock objects in a transport request
Hi, can you help me? I don't know how to unlock objects during a transport request. At the moment I have to unlock them one by one manually. I'm looking for a way to do it automatically.
Thanks..Hi Bay,
goto SE03,on the right side drill down Requests//task
double click on unlock objects>give your transports request>execute
Hope this helps
Regards,
Venkatesh -
How to create object at infoview
Hi all
i am using SAP BO 3.1
How to create object called SL NO this is not available at universe and second object "code" is coming from universe.
final output should be like this
SL NO
code
1
Non-Emergency ED Utilization
2
Office Visits
3
Inpatient Stays
thanks in advance!!
RanjeetHi Ranjeet
Insert one column in that report. Write formula like this...
=LineNumber()-1
Regards,
G -
How to create objects in stack
I am working on Weblogic 10 and JDK 1.5. In Java the objects are always created in heap. Can anybody tell me how to create objects in stack?
SKMoharana wrote:
i need objects to be allocated in stack as my application should respond in real time (time predictable).I heard this is possible in Mustang.If I am understanding you correctly, allocating objects on the stack will not help you, and creating objects on the heap will not hurt you.
It is provably impossible to create a truly time predictable application (in any language), so what you're really looking to do is create a program that responds acceptably quickly for an acceptable percentage of the time. For this you can create benchmarks like "responds in 250 milliseconds or less 99.5% of the time".
To this end, you could create a prototype program that creates the objects you wish on the heap, and see if there actually is a problem. Don't fall into the trap of premature optimization.
Even if you do discover that your object creation IS the problem, heap allocation is not the problem. Take a look at this article. It takes ten machine instructions, less than 1 millisecond, to allocate an object.
Your performance problems are most likely in the object initialization (look for long loops or deep recursions), the display (if this is a GUI application), or your network connection (if this is a web application). -
How to create objects to paint itselfs without specifiy the location
How to create objects to paint itselfs without specifiy the location using Java 2D
shot in the dark: pass in the Graphics2D context to the method ?
-
How to resize objects simultaneously
Hi,
I originally posted a question in the past regarding how to transform objects simultaneously in Illustrator, and the answer had to do with using "transform each" in the object menu. I am trying to do the same in Indesign, but since there is no "transform each" option (or maybe I just missed it, or there is something similar), I am looking for another way..
I have arrows heads in a diagram that need to be scaled down to about 50% their current size. The problem with scaling is that when all objects are selected, they are treated as though they are one large object, and then scaled so that they all meet in the center (ie. at 50% their size, they all shift together as a photo would scale). Is there any way to do this so that the arrow heads stay in place after each one is scaled up or down?
I'd appreciate any help. Thanks.Yep. Choose one, scale then select the rest and
Object > Transform Again > Transform Again Individually -
How to shift object slightly in keynote?
How to shift object slightly in keynote? It always jumps to be alighned with other objects.
First, the reason why that's happening is because you have Alignment Guides turned on in the Preferences under Rulers. If you turn that off, then it'll stop snapping to other objects.
If you do generally want alignment, BUT, every now and then just need it to move objects so that they won't SNAP to it, you can hold down the Command key either before you start dragging or after you've already started dragging. This will cause the object you're dragging to stop snapping to alignment guides for as long as you're holding down Command.
Also, if you just need to move an object 1 pixel, you can use the arrow keys. Holding down Shift while pressing the arrow keys moves you 10 pixels for every arrow press instead of 1. -
Hi,
I am new to EP any body know How to unlock objects in EP. thanks in Advance.
Thanks,
VikasGo to system admin, Monitoring ,Portal , Object locking.
You should be able to see all your locked objects.
Select and unlock.
Maybe you are looking for
-
Printing crystal report through infoview in CRS XI R2
Post Author: ngk CA Forum: Publishing Hi , We are using the crystal report server xi 2 version on windows. I have my reports published and am trying to schedule them through infoview to print to a particular printer which is my default printer. When
-
Can i use the same payment info on more than one iphone?
Can i use the same payment info on more than one iphone?
-
Unknown Travel Costs in a Purchase Order
We have the problem, that we have Consulting Companys that don't offer a special travelrate, so the price is always different (hotel, taxi, flight etc always differs). How do you handle this? Do you create an extra item "travel costs" ? What Quantit
-
Problem with utube it says verify web address after buffering help!
When I want to watch a video on youtube it starts buffering then writes verify the web address if valid then stops. What's the solution?
-
Hi, I am using a ftp adapter to transfer files. I am placing a 9kb file but after the transfer at the destination I find the file transferred but the file size is 2.8kb. Please do suggest me the possible solution and the reason for this issue Thanks