Create administered object
Hi,
I have a stand alone application which connect to an EJB server, so I would like to use the JMS provider in my application but I don't want to use my JMS provider for the creation of TopicFactory and Topic (and then use a lookup).
Is there a portable way to do this?
The only way I found is like that (with sun MQ) :
com.sun.messaging.TopicConnectionFactory myConnFactory = new com.sun.messaging.TopicConnectionFactory();
try {
myConnFactory.setProperty("imqAddressList", "mq://localhost:7676/jms");
} catch (JMSException je) {
TopicConnection connection = myConnFactory.createTopicConnection();
TopicSession pubSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicSession subSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
com.sun.messaging.Topic myTopic = new com.sun.messaging.Topic();
try {
myTopic.setProperty("imqDestinationName", "new_topic_name");
} catch (JMSException je) {
TopicPublisher publisher = pubSession.createPublisher((javax.jms.Topic)myTopic);
TopicSubscriber subscriber = subSession.createSubscriber((javax.jms.Topic)myTopic);
// Set a JMS message listener
subscriber.setMessageListener(this);
// Intialize the Chat application
set(connection, pubSession, subSession, publisher, username);
// Start the JMS connection; allows messages to be delivered
connection.start();
Several JMS implementations support JNDI lookups in pretty much any context. JNDI lookups are the recommended method of creating administered objects and they are for the most part portable (if by portable, you mean portable from JMS provider to JMS provider).
If you must create concrete objects, the only JMS agnostic method would be reflection and that would be pretty ugly.
Dwayne
============
http://dropboxmq.sourceforge.net
Similar Messages
-
Creating jms administered object
I am getting the message "Object Not Found Code - 32" while creating jndi naming service under jms administered object stores. Can anyone help me how to create an object.
Looks like the entry your trying to add doesn't have a parent... I suggest that you check the DN (Context) of the entry you're trying to add and/or that the parent entry exist in your directory.
Regards,
Ludovic. -
How do I create an object store on JMQ 2.0?
I have a question about creating an object store in JMQ 2.0 using the
administration tool.
The documentation doesn't explain it that clearly because it says for
development purposes, you should be able to get away with the default
configuration. The default configuration as far as I can see has no object
store for JNDI lookup.
What I need is an object store that I can connect with using an
InitialContextFactory to the broker URL. I'd like to then use that
Connection to lookup ConnectionFactories (topic and queue).
Again, I thought the documentation would explain all of this, but haven't
been able to find anything. Please advise.To answer your question, you can use the 'jmqadmin'
(graphical interface) or 'jmqobjmgr' (command line interface)
to configure administered objects that you store in a
JNDI service provider. This object store has to be set up
in advance which may mean creating a directory if a file store
is used, or setting up an LDAP server.
Here as the basic steps to add administered objects
if you're using the graphical implementation ('jmqadmin'):
1. Set up some sort of object store repository outside the admin
tool (you can use LDAP or create a file system directory).
2. Add an Object Store connection to the repository you
just set up:
- Run 'jmqadmin', click on the tree node "JMQ Object Stores".
- Select Actions->Add Object Store.
- Name this Object Store with a value in "Object Store Label".
- Fill in the values for java.naming.factory.initial
and java.naming.provider.url and any other necessary JNDI values.
- Select OK
3. To add objects to this object store you just set up:
- First make a connection to this store:
Select Actions->Connect to Object Store
- Click on the "Destinations" or "Connection Factories" node
under this object store.
- Click on Actions->Add Destination Object or Add Connection Factory Object
and fill in the values in the dialog. -
Sun One App Server 8.1,Sun One Message Q3.6,administered objects in LDAP
Hi,
Has anyone tried hosting an MDB on Sun One App Server 8.1 listening to a queue on Sun One Message Queue 3.6 through administered objects in directory server...? It looks quite straight forward but somehow it doesn't seems to work. Any idea if Sun one app server supports this type of architecture...?
Regards,
PriteshHi,
Even I didn't see any obvious reason why it shouldn't work untill I found that Sun One App Server 8.1 does not support external JNDI lookup to Sun MQ 3.6 through administered objects. However, it is possible using a newly released generic resource adapter for JMS 1.5 RC1. I am still fighiting on it and let you know if it works.
I was getting an error "JMS resource can not be created" during deployment time.
Regards,
Pritesh Thakor -
Why are "ConnectionFactory" and "Destination" administered objects?
What does the spec mean by saying that they are administered objects?
What are the advantages of having them as administered objects? (and not any other objects in the spec)?
What are the difficulties in maintaining them programatically? Why should some one admin them? What does the admin do?
Besides the above, I have another Question:
What makes anyone use multiple Sessions in one Connection, instead of using a Single Session to send messages? Why is there a Concept of a Session? Can't it just be Connection?
Can someone throw light on (any of) these?
Thanks,
Kalyan.hi.
all applications that have a JMS Connection in order to send and receive messages, should have their Connection objects hook to the same server (the JMS provider). It is therefore appropriate that they all use a ConnectionFactory that has the same characteristics and metadata. The easiest way to do it, is to register the ConnectionFactory somewhere in the system that's well-known - e.g. a JNDI service. It doesn't make sense to have all clients configured individually. This is why you administer a ConnectionFactory.
Destination objects are also common to all clients. everyone who uses your JMS provider should have access to the correct list of destinations. again - it just doesn't make sense to configure each client separately, so you register all public Destination objects in the same service (again - JNDI is a good choice).
All other objects are application-specific. a Connection/Session/MessageConsumer (and so on) object is valid only for the application that created it. there's no need to register it elsewhere, because no one else should have access to those objects. Basically, you could say, that only objects that every client should access - are to be administered.
Multiple Session objects on a Connection are used when you want to separate parts of the application. a Session means that you are serializing the delivery of messages. if you have multiple threads in your app, you might want to give each sending thread a different Session object, because otherwise - they will all block on the communal Session.
additionally - you should not use one Session object for both consuming and producing of messages, so -if your app wishes to do both, it should have at least two Session objects.
moreover - when consuming messages, you do not use the same Session object for synchronous and a-synchronous consuming. so - if you need a consumer to block until it gets a message, and you need another consumer to wake up as a listener when a message arrives - you will need two Session objects.
Last but not least, suppose you have two producers in your application. one of them needs to use a transacted Session, and the other one does not - (or you need different acknowledge modes) - you must use multiple Session objects.
hope that helps.
Nimo. -
What is meant by administered objects in jms
what is meant by administered objects in jms..
and
is this Analogy true : JMS Provider like JDBC Driver
or JMS Provider like DBMS(IBM MQ)
what that provider is.....In my previous job I was developer/administrator etc for the was environment and although I don't know if there are any hard and fast rules to what administered objects are I classed anything that get created in WAS as adminstered objects so that would be the likes of:
JMS Queues
JMS Queue Connection Factories
Datasources
J2C Aliases
JDBC Providers e.g. Sybase driver
In the case of WAS 6+ then that would also include your service integration buses, foreign MQ buses etc.
Basically anything that you can script using wsadmin
Hope that helps.
Matt -
Error while creating info object
error while creating info object a character
Info object may be a maximum of 000060 digits...... what would be the error?
Thanks ALLHi,
The maximum length supported by one CHAR type infoobject is 60. Check whether you have assigned more.
If you have to load more length ( more than 60) split the total thing into different infoobjects. Create different infoobjects and split the total thing into them - like 1st 60 char in 1st infoobject, char 61-120 in 2nd infoobject and so on. Then you can again concatenate them.
Thanks,
Indrashis -
What is the diffrence between extends and creating new object?
HI ALL,
what is the diffrence between extends and creating new object?
meaning
class base{
class derived extends base{
class base{
class derived {
derived(){
base var = new base();
can u people tell me diffence from the above examples.
THANKS.
ANANDAWhen you create a new object you have to supply the class to which that
object belongs. A class can extend from another class. If it does so
explicitly you can define the 'parent' class from which the class extends.
If you don't explicitly mention anything, the class will implicitly extend
from the absolute base class named 'Object'.
Your example is a bit convoluted: when you create a Derived object,
its constructor creates another object, i.e. an object from the class from
which the Derived class extends.
Extending from a class and creating an object don't have much in common.
kind regards,
Jos -
Creating Activity object for a Service Request object...
<b>[This thread was migrated from the On Demand Developer Forum in the old Siebel Community] </b>
drangineni
New Contributor
Ho do we use Activity object of a Service Request object. I am trying to
create an Activity object for a existing Service Request object.
I am looking for some sample code.
I greatly appreciate your help.
Product: CRM OnDemand
11-26-2006 12:40 PM
Re: Creating Activity object for a Service Request object...
BigSlick
Valued Contributor
drangineni, What programming language are you using?
BS
12-04-2006 10:56 AM
Re: Creating Activity object for a Service Request object...
drangineni
New Contributor
Hi, I am using C# .
12-04-2006 07:40 PM
Re: Creating Activity object for a Service Request object...
BigSlick
Valued Contributor
drangineni, assuming you know the service requestid or externalId of the
Sr you are dealin gwith you would first set that value.
ServiceRequest1[] objSRList =new ServiceRequest1[1];
objSRList[0] = new ServiceRequest1();
objSRList[0].ServiceRequestId = <YourSRId>;
Then you create an array of activities and initialize the first one:
objSRList[0].ListOfActivity = new Activity[1];
objSRList[0].ListOfActivity[0] = new Activity();
Now set the data fields
objSRList[0].ListOfActivity[0].Subject ="My Subject";
objSRList[0].ListOfActivity[0].Description ="My Description";
objSRList[0].ListOfActivity[0].Display = "Task"; //valid values are either
"Task" or "Appointment"
Then call the ServiceREquestInsertOrUpdate method on the ServiceRequest
WebService and pass in the above variable.
BS
12-06-2006 12:36 PM
Re: Creating Activity object for a Service Request object...
drangineni
New Contributor
Thank you BigSlick.
The following error is thrown when I use the
ServiceRequestInsertOrUpdate(objInput)
"No user key can be used for the Integration Component instance 'Service <br/>
Request_Action'.(SBL-EAI-04397)"
When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
thrown and the Activity gets added, but a new Service Request object is
created, but the Activity gets added to an existing Service Request
object. I greatly appreciate your help.
The following is the code:
int ActivityLength = 0;
WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
WSOD_ServiceRequest.ServiceRequest1[1];
ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
ServiceRequest[0].ListOfActivity = new
WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
ServiceRequest[0].ListOfActivity[ActivityLength].Description =
this.txtDescription.Text;
ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
WebSelfService.WSOD_ServiceRequest.ServiceRequest();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
objInput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
objOutput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
objInput.ListOfServiceRequest = ServiceRequest;
Session objSession;
objSession = (Session) Application["Session"];
prxySrvcRequest.Url = objSession.GetURL();
try
objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
catch(Exception e)
12-09-2006 09:53 AM
Re: Creating Activity object for a Service Request object...
drangineni
New Contributor
Thank you BigSlick.
The following error is thrown when I use the
ServiceRequestInsertOrUpdate(objInput)
"No user key can be used for the Integration Component instance 'Service <br/>
Request_Action'.(SBL-EAI-04397)"
When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
thrown and the Activity gets added, but a new Service Request object is
created, but the Activity gets added to an existing Service Request
object. I greatly appreciate your help.
The following is the code:
int ActivityLength = 0;
WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
WSOD_ServiceRequest.ServiceRequest1[1];
ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
ServiceRequest[0].ListOfActivity = new
WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
ServiceRequest[0].ListOfActivity[ActivityLength].Description =
this.txtDescription.Text;
ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
WebSelfService.WSOD_ServiceRequest.ServiceRequest();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
objInput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
objOutput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
objInput.ListOfServiceRequest = ServiceRequest;
Session objSession;
objSession = (Session) Application["Session"];
prxySrvcRequest.Url = objSession.GetURL();
try
objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
catch(Exception e)
12-10-2006 08:49 AM
Re: Creating Activity object for a Service Request object...
BigSlick
Valued Contributor
Ah yes, I forgot you also need to specify a unquie Id for the activity.
It's kinda strange.
Try adding this:
ServiceRequest[0].ListOfActivity[ActivityLength].ActivityId = "DummyId";
//OD will overwrite this with a real Id
Or if you have a unquie ID for your Activities you can use:
ServiceRequest[0].ListOfActivity[ActivityLength].ExternalSystemId = <Your
Unique Value>;
Hope that helps,
BS
12-11-2006 10:52 AM
Re: Creating Activity object for a Service Request object...
surgientweb
New Contributor
Hi all,
I have a similar problem, but mine is returning a message that field
"Display" is required. Looking at this post and the documentation it is
obvious that Display is a required field, but my WSDL did not include a
field called "Display", so my proxy did not generate one.
I tried adding a field called Display to the WSDL and the proxy class, but
I get a different error... I figure I maybe cannot add it manually like
that - but I think the bigger problem is it is not part of the WSDL that
Siebel OD generates for me in my admin account.
On top of that Display is not shown in the list of fields for Activity
through the admin interface.. is it possible my account is bugged? Am I
missing something simple here? BigSlick, I see you mention a .Display in
your code sample so I thought you might understand what is wrong. Here is
my code (I am trying to add a activity to a lead).
Thanks for any insight into this!
private void InsertLeadActivity(Session session, NameValueCollection data,
string leadID)
try
if (blnDebug)
Response.Write("Setting up Activity<br>";
// instantiate the proxy service
Activity_Service.Activity activityProxy = new Activity_Service.Activity();
// set up the target URL
activityProxy.Url = session.GetURL();
activityProxy.CookieContainer = session.GetCookieContainer();
// set up input argument
ActivityNWS_Activity_Insert_Input input = new
ActivityNWS_Activity_Insert_Input();
input.ListOfActivity = new Activity1[1];
input.ListOfActivity[0] = new Activity1();
if (blnDebug)
Response.Write("Getting Data<br>";
// dg note: name value
// input.ListOfActivity[0].MrMrs = data["MrMrs"];
input.ListOfActivity[0].LeadId = leadID.ToString();
input.ListOfActivity[0].Description = DataToString(data);
input.ListOfActivity[0].Subject = "Website Submission Activity";
input.ListOfActivity[0].Priority = "3-Low";
//input.ListOfActivity[0].DueDate =
DateTime.Now.AddDays(7).ToShortDateString();
input.ListOfActivity[0].Owner = this.defaultLeadOwner;
input.ListOfActivity[0].Type = "Call";
//input.ListOfActivity[0].Display = "Task";
input.ListOfActivity[0].ActivityId = "DummyId";
input.ListOfActivity[0].ExternalSystemId = "web";
activityProxy.Activity_Insert(input);
catch (Exception exInsertActivity1)
if (blnDebug)
Response.Write("<br>Error inserting activity.<br><br>" +
exInsertActivity1.ToString() + "<br>";
01-06-2007 05:05 PM
Re: Creating Activity object for a Service Request object...
surgientweb
New Contributor
Figured it out.. the field "Display" is also known as "Activity"........
Here are some notes for other people.. good luck and feel free to write me
at raskawa-at-gmail-com if you want a code sample.
Some unpublished nice to knows for Siebel On Demand Activities....
In summary:
- .Activity is also known as Display in documentation and on the error
messages coming back from the WS. Also, it appears based on these boards
some people actually have a .Display field. Maybe different accounts
generate different WSDL's.... buggy.
- If a error message is thrown saying "Description is required" it really
means "Subject is required" (make sure .Subject has a value)
- If a error message is thrown complaining that ActionType is not right..
that is really .Type.. make sure it's lookup value is valid for the
dropdown values in your CRM OD system.
My code/values that worked..
input.ListOfActivity[0].LeadId = leadID.ToString();
input.ListOfActivity[0].Description = DataToString(data);
input.ListOfActivity[0].Subject = "Website Submission Activity";
input.ListOfActivity[0].Priority = "3-Low";
//input.ListOfActivity[0].DueDate =
DateTime.Now.AddDays(7).ToShortDateString();
input.ListOfActivity[0].Owner = this.defaultLeadOwner;
input.ListOfActivity[0].Type = "Call";
input.ListOfActivity[0].ActivityId = "DummyId";
input.ListOfActivity[0].ExternalSystemId = "web";
//input.ListOfActivity[0].Display = "Task"; //doesn't work
input.ListOfActivity[0].Activity = "Task"; //does work.
01-06-2007 05:17 PM
Re: Creating Activity object for a Service Request object...
raskawa
First Time Contributor
Hi,
This is surgientweb (under my own login now..)
Anyway, I wanted to add that I figured out that there are two ways to add
a Activity to a Lead. Via the Lead object (by getting a ListOfActivities)
OR by creating a Activity directly and just adding your "LeadID" to it (or
you can also add a "ContactID" to relate the activity to a Contact.)
Feel free to email me for a code example (raskawa....at....gmail)
-David
01-09-2007 02:58 PMHi Stephane,
You can definitely read the categories using Tables in CRM. The logic is a bit complicated though.
Use the following steps to retrieve Categories using Std. CRM Tables:
1. Pass transaction GUID in field GUID of table CRMV_REPORT_SUBJ and get KATALOGART, CODEGRUPPE and CODE field values in lv_catalog, lv_codegrp and lv_code.
2. Now you need to concatenate these 3 fields values carefully like this:
CONCATENATE lv_catelog lv_codegrp ' ' lv_code into lv_category1.
Remember there are 4 spaces between lv_codegrp and lv_code.
3. Now pass this lv_category1 in field OBJEXT in table CRMC_ERMS_CAT_OK and get OBJGUID in field lv_objguid.
4. Pass this lv_objguid in field OBJ_GUID and LNK_TYPE = 'IS_CODE' in table CRMC_ERMS_CAT_LN and get value of CAT_GUID in lv_cat_guid.
5. Pass this lv_cat_guid in field CAT_GUID in table CRMC_ERMS_CAT_CA and get value of CAT_ID in field lv_cat_text.
Remember this lv_cat_text is the text value of your last level of category of transaction.
6. To get its upper cateogry level value, simply use table CRMC_ERMS_CAT_HI and get parent guid value and pass this as CAT_GUID again in table CRMC_ERMS_CAT_CA to get its text.
Alternatively, you can also use class method cl_crm_ml_category_util=>get_parse_all to get all levels of categories.
Hope this helps.
Thanks
Vishal -
When I try to open an embedded PDF file (Word doc) I get an error "The program used to create this object is AcroExch.exe. That program is either not installed on your computer, or is corrupt..." I've tried about everything from unchecking
protected mode at startup to removing & reinstalling Adobe. Nothing seems to fix this issue. Any other ideas?
This is happening on Adobe reader 9, 10 & 11 with MS Word 2010 & 2013. I've uninstalled, cleaned & reinstalled Reader 9, 10 & 11, as well as Acrobat 10 Pro & 11 Standard. Removed "Protected mode at startup, and changed
the default program for viewing from reader to Acrobat. This will not go away. It is affecting production at our company." Help > Troubleshooting Information > Profile Directory: Open Containing Folder" . i can't find open containing folder in profile directory. it does give me the option to open the places.sqlite file using graphic converter. when i try that, graphic converter gives me a window saying that it can't be opened because it is corrupted or is not a file type supported by graphic converter.
i appreciate your help with a workaround to get the old bookmarks. that works. however, the problem has morphed from that concern to why adobe reader [the default app.] won't open firefox .sqlite files. is the problem in adobe reader or firefox? also, how can i tell if the places.sqlite file is corrupt?
i'm getting in over my head here and do appreciate your help. -
How to create multiple objects within a class
I have a item.lvclass which has an item.ctl (contains a cluster of class private data). I need to add another object (item2.ctl) within that same class so that I can reuse the code for that class.
So how do you create additional objects within the same class?Well... right now... I've cornered myself going down this path: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/LVOOP-Interfaces/idc-p/1314637#M8918
Seems like the solution in the idea was not implemented yet....
Okay. I will try to describe the situation differently...
Let's say I have a Car.lvclass
I want to have two objects: sedan & roadster
both have similar properties, but also have different properties:
4 doors vs 2 doors
hardtop vs convertible
silver vs white (color)
I want the two objects to be of the same class so that they can share the same private and public VI's. As a matter of fact, I want to have both objects in the VI's within the Car.lvclass. -
How do I create multiple objects during runtime?
I don't know how to create multiple objects during runtime, here's my problem:
I get a String as input. Then I create an object called newobject. I put the object in a hashtable with the above string as key.
Then comes the problem, in order to create a new object, I have to rerun the same class, which uses the same name (newobject) to create a 2nd object. Now my hashtable doesn't reference to my 1st object anymore...
Is there anyway I can fill up the hashtable with different objects, and make each key point to each object it was supposed to?
For those who want to see a bit of the program:
public class PlayBalloon{
public Hashtable ht = new Hashtable();
for(){
Balloon pB = newBalloon;
newBalloon=new Balloon(pB);
ht.put("Some input from user", newBalloon);
for(){
ht.get(s).draw;<= s=string, draw=own meth. in Balloon
}I think i can see the problem that you are having. You have, in effect, duplicate keys in your hashtable - ie, two strings used as keys with the same name.
The way that a hashtable works is as follows...
When you ask for a value that is mapped to a key it will go through the table and return the first occurence it finds of the key you asked for. It does this by using the equals() method of whatever object the key is (in your case it is a String).
If you cant use different Strings for your keys in your hashtable then i would consider writing an ObjectNameKey class which contains the String value that you are trying to put in the hashtable and an occurrence number/index or something to make it unique. Remember to override the equals method in your ObjectNameKey object or else the hash lookup will not work. For example
class ObjectNameKey {
private String name;
private int occurence;
public ObjectNameKey(String name, int occ) {
this.name = name;
this.occurence = occ;
public String getName() {
return name;
public String getOccur() {
return occurence;
public boolean equals(Object o) {
if (!(o instanceof ObjectNameKey)) {
return false;
ObjectNameKey onk = (ObjectNameKey)o;
if (onk.getName().equals(name) && onk.getOccur() == occurence) return true;
return false; -
Can you create an object from a string
I have been working on creating a dynamic form, creating the
form items from an xml file. I am getting very close to conquering
this task. I will share it when it's complete.
However, I am stuck at the moment trying to create an object
from a string. For example, if the xml item is an HBox I want to
create an HBox. Like this: parentObject = new arrayOfFormItems[
index ]..type ()
This isn't working. First, is this possible using some syntax
I am unaware of in Flex? I don't want to use a large if or case
statement if possible.
Thanks in advance for your help!Thank you very much. Indeed that did solve the one problem. I
missed the casting as a Display Object. That is awesome!
I do still however, have to instantiate one of every item I
want to dynamically create or I get the following error when I try
to create a dynamic object that I have not instantiated before.
ReferenceError: Error #1065: Variable HBox is not defined.
at global/flash.utils::getDefinitionByName()
at MyForm/buildForm()
at DynamicForm/::onComplete()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
I read that you have no choice but to instantiate one of each
type to force the linker to link the code for that class into the
.swf. Unless you know another way to force it.
This is what I have in my Application mxml to get it to work:
<mx:HBox>
<mx:Text visible="false"/>
<mx:TextArea visible="false"/>
<mx:TextInput visible="false"/>
<mx:DateField visible="false"/>
</mx:HBox>
And those are the types I'm using to test with. . . I will
have to add all the others I want to use as well . . . -
How can I create a object for a note?
Hi experts,
I need to apply the note 501905 but when I try in the SNOTE transacction I receive this error:
Object REPS Z_MRM_DELETE_PP does not exist; create it
Diagnosis
The SAP Note that you want to implement contains changes to an object that does not yet exist in your system.
SAP Notes contain only changes to objects that already exist. This means that the the system cannot automatically create new objects during the implementation of this SAP Note.
Procedure
1. Cancel the SAP Note implementationl.
2. Create an empty object REPS Z_MRM_DELETE_PP with the corresponding object editor.
3. Restart the SAP Note implementation.
How can I create that Object??
Thanks for the help!Hi Carlos,
It says that you have to create a new program with a name Z_MRM_DELETE_PP.
Once you create and activate the program you can execute the SAP Note.
All this processure will be written in the SAP Note.
Please Go through the Note using below:
Step1: Use T.code SNOTE.
Step2: Use menu GOTO --> NOTE BROWSER. Provide the Note no and EXECUTE.
Step3: Double click on the displayed line.
Here you will get the information to do before implementing the note.
Go through all the documentation, and once you did all the development given in the note then you can implement the note.
Regards,
Sreekanth. -
Not able to create an object using dbms_metadata.put function
Hi,
I have the metadata of an object in one of my database table as xml. I failed to recreate the object in the other schema using metadata api. I developed a stored function to do the above job. My function doesn't throw any error meanwhile it doesn't create the object.
My code snippet is
CREATE OR REPLACE PROCEDURE DDI.move_table(
table_name in VARCHAR2,
from_schema in VARCHAR2,
to_schema in VARCHAR2 )
AUTHID CURRENT_USER
IS
-- Define local variables.
h1 NUMBER; -- handle returned by OPEN
h2 NUMBER; -- handle returned by OPENW
th1 NUMBER; -- handle returned by ADD_TRANSFORM for MODIFY
th2 NUMBER; -- handle returned by ADD_TRANSFORM for DDL
xml XMLTYPE; -- XML document
errs sys.ku$_SubmitResults := sys.ku$_SubmitResults();
err sys.ku$_SubmitResult;
result BOOLEAN;
BEGIN
SELECT REPOS INTO xml from ddi.ddi_repos_t where obj_id = '1801';
-- Specify the object type using OPENW (instead of OPEN).
h2 := DBMS_METADATA.OPENW('TABLE');
-- First, add the MODIFY transform.
th1 := DBMS_METADATA.ADD_TRANSFORM(h2,'MODIFY');
-- Specify the desired modification: remap the schema name.
DBMS_METADATA.SET_REMAP_PARAM(th1,'REMAP_SCHEMA',from_schema,to_schema);
-- Now add the DDL transform so that the modified XML can be
-- transformed into creation DDL.
th2 := DBMS_METADATA.ADD_TRANSFORM(h2,'DDL');
-- Call PUT to re-create the object.
result := DBMS_METADATA.PUT(h2,xml,0,errs);
DBMS_METADATA.CLOSE(h2);
IF NOT result THEN
-- Process the error information.
FOR i IN errs.FIRST..errs.LAST LOOP
err := errs(i);
FOR j IN err.errorLines.FIRST..err.errorLines.LAST LOOP
dbms_output.put_line(err.errorLines(j).errorText);
END LOOP;
END LOOP;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE_APPLICATION_ERROR(-20510,'No xml is available as metadata');
END;
Could you tell me where is the probelm?
The schema where i created and execute my function having dba privilege also.
Regards,
Madhavi.Hi Madhavi,
The below code works for me:
SQL> conn sys as sysdba
Connected.
SQL> select count(*) from dba_objects where object_name = 'DEPT' and owner = 'OE';
COUNT(*)
0
SQL> CREATE OR REPLACE PROCEDURE move_table(
2 table_name in VARCHAR2,
3 from_schema in VARCHAR2,
4 to_schema in VARCHAR2 )
5 AUTHID CURRENT_USER
6 IS
7 -- Define local variables.
8 h1 NUMBER; -- handle returned by OPEN
9 h2 NUMBER; -- handle returned by OPENW
10 th1 NUMBER; -- handle returned by ADD_TRANSFORM for MODIFY
11 th2 NUMBER; -- handle returned by ADD_TRANSFORM for DDL
12 xml clob; -- XML document
13 errs sys.ku$_SubmitResults := sys.ku$_SubmitResults();
14 err sys.ku$_SubmitResult;
15 result BOOLEAN;
16 BEGIN
17
18 select DBMS_METADATA.GET_XML('TABLE','DEPT','SCOTT') into xml from dual;
19
20 -- Specify the object type using OPENW (instead of OPEN).
21 h2 := DBMS_METADATA.OPENW('TABLE');
22
23 -- First, add the MODIFY transform.
24 th1 := DBMS_METADATA.ADD_TRANSFORM(h2,'MODIFY');
25
26 -- Specify the desired modification: remap the schema name.
27 DBMS_METADATA.SET_REMAP_PARAM(th1,'REMAP_SCHEMA',from_schema,to_schema);
28
29 -- Now add the DDL transform so that the modified XML can be
30 -- transformed into creation DDL.
31 th2 := DBMS_METADATA.ADD_TRANSFORM(h2,'DDL');
32
33 -- Call PUT to re-create the object.
34 result := DBMS_METADATA.PUT(h2,xml,0,errs);
35
36 DBMS_METADATA.CLOSE(h2);
37 IF NOT result THEN
38
39 -- Process the error information.
40 FOR i IN errs.FIRST..errs.LAST LOOP
41 err := errs(i);
42 FOR j IN err.errorLines.FIRST..err.errorLines.LAST LOOP
43 dbms_output.put_line(err.errorLines(j).errorText);
44 END LOOP;
45 END LOOP;
46 END IF;
47 EXCEPTION
48 WHEN NO_DATA_FOUND THEN
49 RAISE_APPLICATION_ERROR(-20510,'No xml is available as metadata');
50 END;
51 /
Procedure created.
SQL> exec move_table('DEPT','SCOTT','OE');
PL/SQL procedure successfully completed.
SQL> select count(*) from dba_objects where object_name = 'DEPT' and owner = 'OE';
COUNT(*)
1
SQL> spool off;The xml returned by the get_xml function contains the tablespace name and storage parameters of the schema in which the object is present.
Check these parameters for both your schemas.
Maybe you are looking for
-
Weblogic 10.3.2 Error when deploying ear file
Using WLS 10.3.2, wwhen activating changes, I obtain following errors: An error occurred during activation of changes, please see the log for details. Exception occured while downloading files [DeploymentService:290066]Error occurred while downloadin
-
Can't get JDK to work! Please help!
Hi, I have downloaded the JDK1.3.1 many times and I have try installing it into different computers at home but none of them work. Is there like an online thing where I can compile my code and run it. Because at home it seems not to work but in schoo
-
Saving report generation word file to a previous version of word
hello everybody, well, the problem is quite simple. on the computer of my bench I have office 2007, when I save a report generation word file it saves it from the template to a word 2007 file. file which is unreadable from a word 2003. Is there any o
-
How can I change dates to the UK format, DD/MM/YY, in Mac Numbers?
How can I change dates in Mac Numbers to the UK format of DD/MM/YY? When I correct them individually they automatically return to the US format.
-
How create URL for see my folio on the web content viewer ?
Hello, I try to create URL for see my folio on the web content viewer but nothing Work i have this informations : my applicationName my accountID my publication Name and my articleName (even if for this i'm not sure) All my articles are free, my foli