Programmatically create a new fileRealm.properties

Hello,
Is there a way to programmatically create a new fileRealm.properties?
Imagine I've one soft platform which is based on the webLogic.when I
install the software I don't want to install webLogic again and create
a new domain in advance,so I want to create the domain during the
install and dynamicly generate the essential files including
fileRealm.properties.
Are there any best practices here?

When you add operation "Create with parameters", an action "createWithParams" is created inside your page definition file. If you look in the structure window on the left hand side of your screen, you will find it under the "bindings" node.
Right click on it and select "Insert inside ..." and then "NamedData". "NamedData" node will appear under the action "createWithParams".
Right click on it and select "Go to properties". There you will see attributes NDName, NDType and NDValue (you don't have to worry about the NDOption attribute).
Under NDName, write the name of the attribute you'd like to set.
Under NDType write the class type of this attribute (example: oracle.jbo.domain.Number ).
Under NDValue, write the default value of this attribute. This can be a direct value or EL expression.
Example:
+<action IterBinding="EmployeesIterator" id="Createwithparameters"+
InstanceName="AppModuleDataControl.Employees"
DataControl="AppModuleDataControl" RequiresUpdateModel="true"
Action="createWithParams">
+<NamedData NDName="FirstName" NDType="java.lang.String" NDValue="#{requestScope.userFirstName}"/>+
+</action>+
As you can see from the example above, my attribute is "FirstName", it is of type "java.lang.String" and its value should be derived from EL expression "#{requestScope.userFirstName}".
If you need help with the expression language, you can search for the document "The Java EE 6 Tutorial Volume II Advanced Topics" on Google. It contains an overview of EL. Useful stuff :)
Kristjan
p.s. You can also buy the "Jdeveloper 11g Handbook". It's a great resource of information :)
Edited by: Kristjan R. on 8.7.2010 3:45

Similar Messages

  • Programmatically creating a new database

    Is there a way to programmatically create a new database?
    I am on a RH Linux 7.3 box using MySQL with mm.mysql driver.
    Thank you,

    whatever you command u exec at the DB to create a new DB u can run it over JDBC using a CallableStatment. I guess that what you should be doing.

  • Programmatically Creating Controls

    I have figured out how to programmatically modify controls, but do not know
    how to programmatically create controls. I am using Labview 6i. Any
    suggestions?
    Thanks,
    Peter

    You cannot programmatically create a new LabVIEW control on the front panel
    of a VI.
    The best you can do is to programmatically open references to templates VIs
    and Controls files (*.vit,*.ctt) and let the user interact with them. New
    VIs and controls are created
    in memory when you open references to templates.
    Jean-Pierre Drolet
    Scientech R&D
    "Peter T" a écrit dans le message news:
    3b0ac9d0@newsgroups....
    > I have figured out how to programmatically modify controls, but do not
    know
    > how to programmatically create controls. I am using Labview 6i. Any
    > suggestions?
    >
    > Thanks,
    >
    > Peter
    >
    >
    LabVIEW, C'est LabVIEW

  • Why no fileRealm.properties created?

    Hello everyone,
    I used start script from weblogic 8.1 to create a new domain and server, but I
    found there is no fileRealm.properties created. What's wrong with it? Each domain
    should have a fileRealm.properties file, shouldn't it?
    Thank you for help.

    "Iris" <[email protected]> wrote:
    I used start script from weblogic 8.1 to create a new domain and server,
    but I
    found there is no fileRealm.properties created. What's wrong with it?
    Each domain
    should have a fileRealm.properties file, shouldn't it? WLS 8.1 does not require a fileRealm.properties unless using compatibility security.
    -Craig

  • How to create a New Excel File programmatically

    Hi !
    I am documenting acquired data continuously in an excel file, what I need to do is to create a new excel file automatically when the size of the previous file exceeds a certain limit lets say 1MB.
    I have tried using the simple 'Create/Open File' function and the 'Write to Spreadsheet File' function to create the new excel file. I does create a file but when I open the file it says the format of the file is not what you have opened it with.
    Also when the new file is created, three new worksheet are to be added programmatically with pre-defined worksheet name and also Column headers for each of the worksheet are to be added.
    I am also using 'Labview Report Generation Toolkit for Office'.
    Regards,
    Reeves
    Solved!
    Go to Solution.

    @ Aldo A
    Thanks for the reference to tutorial, I didn't know about them. They are useful in general but unfortunately they don't answer the problem of creating an altogether new excel file programmatically.
    @ ben64
    The template thing simplifies the issue of formatting the new file. But I am still working on the new excel file creation challenge.
    Let me put my problem in a different way.
    Certain data is being acquired continually and is being written to a certain excel file, when the size of the file exceeds lets say 1MB the program should start saving the data in a NEW FILE instead of the previous file.
    I have attached the VI to explain what I am trying to achieve here.
    Reeves
    Attachments:
    New Microsoft Office Excel Worksheet.zip ‏30 KB

  • How can i create a new user in OID DIT tree programmatically  ?

    Dear All,
    How can i create a new user object in the OID DIT tree programmatically ?
    any help will be appreciated.
    Regards,
    Mohammed Amin

    Dear Eng. Jaime.. 
    Thank you so much  for replay...
    Can yon  explain 
    Do you want to create a contact in Jabber?
    Do you want to enable Jabber for a user?
    And what you meant last question..

  • How to create a new tag in page properties in the sidekick of geometrrix page

    how to create a new tag in page properties in the sidekick of geometrrix pagesame as basic, advanced, blue print??

    Hi prachi,
        Is it tag OR Tab ? Seems like you are looking for Tab. Look at [1] & overlay to custamize per your need. Or define at your page component.
        [1]   /libs/foundation/components/page/dialog/items/tabs/items
    Thanks,
    Sham

  • How to get rid of the properties tab popping out when I create a new shape?

    Hi! I am having a bit of trouble getting rid of the properties tab that pops out everytime I create a new shape in Photoshop CC.
    Are there some settings to stop this from happening? I have my space strictly organized, as most of you probably, and I need to close it each time I create new shape... so it's frustrating.
    Thank you!

    After you draw out a shape, then go to the Properties panel fly-out menu and uncheck Show on Shape Creation

  • How to create programmat​ically a new step type in TestStand (to myTypes.in​i)

    I need to create a new step type to myTypes.ini file programmatically. I have tried to do it with following steps:
    - Get reference to engine
    - Load type palette files
    - creating new step type (engine.NewSteptype() )
    - Inserting new type using TypeUsageList.InsertType method. Problem with this is the first parameter. It excpects it to be in a form of PropertyObject, but engine.NewStepType returns it as a StepType object. If I try to use StepType.AsPropertyObject it returns an error.
    How to convert StepType object to a PropertyObject?

    And here it is in C++:
    TS::IEnginePtr mEngine;
    SAFEARRAY * typeList;
    TS::TypeUsageListPtr typeUseage;
    TS:tepTypePtr stepObj;
    mEngine = engine;
    mEngine->LoadTypePaletteFiles();
    typeList=mEngine->GetTypePaletteFileList();
    TS:ropertyObjectFilePtr *rgelems;
    SafeArrayAccessData(typeList,(void**)&rgelems);
    typeUseage = rgelems[0]->TypeUsageList;
    stepObj=mEngine->NewStepType();
    TS:ropertyObject *property = stepObj->AsPropertyObject();
    property->PutName("TestMe");
    typeUseage->InsertType(property, 0, TS::TypeCategory_StepTypes);
    rgelems[0]->IncChangeCount();
    rgelems[0]->SaveFileIfModified(true);
    SafeArrayUnaccessData(typeList);

  • CcBPM  - what does meant "Create New Transaction" properties ?

    Hi XI expert,
    could you enligtheen me on what is the meaning of "Create new transaction" properties in step Send, Transformation in the ccBPM. When i need to tick this properties. ?
    Cheers
    Fernand

    Specify whether the system is to create a separate transaction for the send step.
    You can improve system performance if you define that the system is not to create a separate transaction for the send step. Note, however, that all messages to be sent are collected and not sent until the end of the relevant transaction. This is of particular importance for transactions that take a long time to execute.
    An asynchronous sender step that waits for an acknowledgment must always be executed in a separate transaction.

  • Custom SSIS Source: How do I make it create a new connection manager and display its properties window?

    I am writing a custom SSIS source that uses a standard SSIS Flat File Connection Manager. I have got a working UI that shows all usable connection managers in a dropdown list and allows the user to pick one. I would like to be able to have a button that
    the user can click on to create a new connection manager, and it would open the properties window for the new connection manager so it can be set up.
    Abridged code:
    Public Class MyNewSourceUI
    Implements IDtsComponentUI
    Private MetaData As IDTSComponentMetaData100
    Public Function Edit(ByVal parentWindow As IWin32Window, _
    ByVal variables As Variables, _
    ByVal connections As Connections) As Boolean _
    Implements Microsoft.SqlServer.Dts.Pipeline.Design.IDtsComponentUI.Edit
    Dim UIwin As New MyNewSourcePropertiesWindow(MetaData, connections)
    Return (UIwin.ShowDialog() = DialogResult.OK)
    End Function
    Public Sub Initialize(ByVal dtsComponentMetadata As IDTSComponentMetaData100, _
    ByVal serviceProvider As System.IServiceProvider) _
    Implements Microsoft.SqlServer.Dts.Pipeline.Design.IDtsComponentUI.Initialize
    MetaData = dtsComponentMetadata
    End Sub
    End Class
    Public Class MyNewSourcePropertiesWindow
    Inherits System.Windows.Forms.Form
    Private _metadata As IDTSComponentMetaData100
    Private _cnxions As Connections
    Public Sub New(ByVal ComponentMetaData As IDTSComponentMetaData100, ByVal connections As Connections)
    InitializeComponent()
    _metadata = ComponentMetaData
    _cnxions = connections
    ShowConnections()
    'Setup Existing Metadata '
    End Sub
    Private Sub ShowConnections()
    Me.cboConnection.Items.Clear()
    Me.cboConnection.Items.AddRange((
    From i As ConnectionManager In _cnxions _
    Where CType(i.Properties("CreationName").GetValue(i), String) = "FLATFILE" _
    AndAlso CType(i.Properties("Format").GetValue(i), String) = "Delimited" _
    Select i.Name).ToArray())
    End Sub
    Private Sub btnNewConnection_Click(ByVal sender as Object, ByVal e as System.EventArgs) Handles btnNewConnection.Click
    Dim newconn As ConnectionManager = _cnxions.Add("FLATFILE")
    ShowConnections()
    Me.cboConnection.SelectedItem = newconn.Name
    End Sub
    Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click
    Me.DialogResult = DialogResult.Cancel
    Me.Close()
    End Sub
    Private Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click
    'Store any metadata changes '
    Me.DialogResult = DialogResult.OK
    Me.Close()
    End Sub
    End Class
    That's what I've got so far. I had assumed that adding a new connection would automatically display the properties window to the user (right?). However, in my tests, what actually happens is that it creates the new source with a random GUID for a name and no
    other properties set up, and puts it in the connections pane, and that's it. Not real useful.
    Obviously, something else is required to make the properties window appear, but I can't find what it is. There's no ShowUI() member on any of the classes I have, and I haven't been able to find out the name of the UI class that's used by the flat file source.
    Does anyone know how this is done? I know it can be done, because such a button exists in the normal Flat File Source UI.

    Yes, you need to drive the UI creation. I see you create a custom connection manager, in this case on how to build its UI please refer to http://kzhendev.wordpress.com/2013/08/07/part-2-adding-a-custom-ui-to-the-connection-manager/
    Arthur My Blog

  • Programmatically creating a Rendezvous : missing variable in Result container

    Hi everybody,
    For my tests purpose, I need to programmatically create a sequence. In this sequence, I need to insert Rendezvous steps.
    Everything works fine when creating them, but when I execute the sequence / steps created this error always show up for rendezvous step : 
    Unknown variable 'TimeoutOccured' ; Error accessing item 'Result.TimeoutOccured'
    According to the TS help, this variable should be created when I configure the step for the rendezvous operation. Drag and dropping the step from the TS insertion palette works fine, and the variable is created when chosing the operation 'rendezvous'. But when doing the same thing through programmation, the variable is not created.
    Here are the steps executed to create the RDV step :
    I create a new step using method Engine.NewStep
    I set the step name using Step.Name
    I set the rendezvous properties using a statement (Parameters.BranchesRendezVous.RDVStep is the variable holding the the step reference) :
    Parameters.BranchesRendezVous.RDVStep.AsStep.Operation = 1, //A value that specifies the operation for the step to perform. The valid values are 0 = Create, 1 = Rendezvous, and 2 = Get Status
    Parameters.BranchesRendezVous.RDVStep.AsStep.NameOrRefExpr = Parameters.BranchesRendezVous.RefName, //Contains the Rendezvous Name expression for the Create operation and the Rendezvous Name or Reference expression for all other Rendezvous operations
    Parameters.BranchesRendezVous.RDVStep.AsStep.TimeoutEnabled = False, //The Timeout Enabled setting for the Rendezvous operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.ErrorOnTimeout = True, //The Timeout Causes Run-Time Error setting for the Rendezvous operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.RendezvousCountExpr = Parameters.NbBranches, //The Number of Threads Per Rendezvous expression for the Create operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.Lifetime = 3, //A value that specifies the Lifetime setting to use for the Create operation. The valid values are 0 = Same as Sequence, 1 = Same as Thread, 2 = Use Object Reference, and 3 = Same as Execution
    4. Then I insert the step in my current sequence using method Sequence.InsertStep
    Everything works fine, the rendezvous step is perfectly created and all properties are set finely. However, the variable TimeouOccured is missing in the Step.Result container (TS help says that this propoerty exists when the step is configured as a rendezvous operation (cf. Operation = 1)).
    Am I doing something wrong somewhere ? Why is this variable missing ?
    Solved!
    Go to Solution.

    Hi Doug,
    TS help says that this property exists when the step is configured as a rendezvous operation (cf. Operation = 1)... So shouldn't it be created when I create / insert the step ?
    I find it very weired to add a subproperty to a StepType, in the Result container...

  • How do i create a new domain?

    Is there an easy way to create new domains for WL Server 6.0? There
    doesn't seem to be any tool that allows me to do this. Does that mean
    my only option is to copy files from another domain?
    Thanks for any help,
    Randy Strobel
    Systems Analyst
    Synergy, Inc.
    [email protected]

    Here are a couple of points to pay attention to in addition to the doc
    pointed by Kumar:
    1. you MUST copy fileRealm.properties initially when you create a new domain
    in the domain subdirectory under config in bea.home.
    2. Initial password for the starting servers ( admin or managed) will be
    same as default system password ( system password for the domain from where
    the SerializedSystemIni.dat and fileRealm.propeerties were copied. You can
    start the new domain's admin server and change the syetm password. Next time
    you will start admin server or managed server in new domain, you will be
    using the new password.
    3. If you change the system password through console, and you were using
    password.ini, you must change the password in password.ini file also. If you
    specified the password in startup script, you must manually change it to new
    password. If you were not specifying the password in password.ini or in the
    startup script as -D property, then as always, you will be prompted for
    password, and you can specify the new password.
    Viresh Garg
    Principal Developer Relations Engineer
    BEA Systems
    Kumar Allamraju wrote:
    http://e-docs.bea.com/wls/docs60/adminguide/config.html#1025484
    Randy Strobel wrote:
    Is there an easy way to create new domains for WL Server 6.0? There
    doesn't seem to be any tool that allows me to do this. Does that mean
    my only option is to copy files from another domain?
    Thanks for any help,
    Randy Strobel
    Systems Analyst
    Synergy, Inc.
    [email protected]

  • Programmatically created calendar view does not appear on view selector menu

    Hi!
    I'm using the following code to create a calendar view for a list:
    using (var site = new SPSite("http://localhost"))
    var viewFields = new System.Collections.Specialized.StringCollection { dateStartFieldName, dateEndFieldName, titleFieldName };
    var query = string.Format("<Where><DateRangesOverlap><FieldRef Name='{0}' /><FieldRef Name='{1}' /><Value Type='DateTime'><Month /></Value></DateRangesOverlap></Where>", dateStartFieldName, dateEndFieldName);
    var viewData = string.Format("<FieldRef Name='{0}' Type='CalendarMonthTitle' /><FieldRef Name='{0}' Type='CalendarWeekTitle' /><FieldRef Name='' Type='CalendarWeekLocation' /><FieldRef Name='{0}' Type='CalendarDayTitle' /><FieldRef Name='' Type='CalendarDayLocation' />", titleFieldName);
    var list = site.RootWeb.Lists["ESM Leaves"];
    var newView = list.Views.Add("Calendar11", viewFields, query, 0, true, false, SPViewCollection.SPViewType.Calendar, false);
    newView.ViewData = viewData;
    newView.MobileView = true;
    newView.Update();
    list.Update();
    My problem is that even though the view is created, it does not appear in the View links just above my list. It only appears in the drop down menu of views in the ribbon. On the contrary, if I create the view using the browser user interface (not programmatically),
    the view appears in both places.
    Do you have any idea why this might be happening?
    Dimitris Papadimitriou, Software Development Professional

    Hi papadi,
    I can reproduce the issue that creating calendar view using programming method, the view isn’t shown in view selector menu, and this only happens to calendar view, html view or other views are shown in the menu.
    After editing the web part, disable the selector menu, then re-enable the selector menu again, I can see the calendar view shown in the view selector menu, create a new calendar view using programming, the calendar view shows as expected.
    This seems indicate there is some issue in the view selector menu display, I would suggest you to first disable the view selector menu through edit the web part properties, then create the calendar view.
    Thanks,
    Qiao
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Qiao Wei
    TechNet Community Support

  • Error while creating a new Domain in BEA Weblogic

    I am getting the below mentioned error while creating a new Domain in BEA Weblogic
    Preparing...
    Extracting Domain Contents...
    Creating Domain Security Information...
    Saving the Domain Information...
    Storing Domain Information...
    String Substituting Domain Files...
    Performing OS Specific Tasks...
    Performing Post Domain Creation Tasks...
    Domain Creation Failed!
    Domain Location: C:\bea\user_projects\domains\base_domain_1
    Reason: Got error in writing the node manager C:\bea\wlserver_10.0\common\nodemanager\nodemanager.domains property file!
    Exception:
    java.lang.Exception: Got error in writing the node manager C:\bea\wlserver_10.0\common\nodemanager\nodemanager.domains property file!
         at com.bea.plateng.domain.DomainNodeManagerHelper.registerDomainToNodeManager(DomainNodeManagerHelper.java:138)
         at com.bea.plateng.domain.DomainNodeManagerHelper.registerDomainToNodeManager(DomainNodeManagerHelper.java:170)
         at com.bea.plateng.domain.DomainGenerator.generate(DomainGenerator.java:435)
         at com.bea.plateng.wizard.domain.gui.tasks.DomainCreationGUITask$1.run(DomainCreationGUITask.java:232)

    Hi,
    It look two ways either you dont have permission to write any new thing to that domain.properties file or might file is got corrupted.
    Please check for the permission to that file.
    Regards,
    Kal.

Maybe you are looking for

  • Synching iPhone with external hard drive

    I recently got a new MacBook Pro. For some time, I've been storing all my iTunes music on an external hard drive with no issues. I was having trouble synching my iPhone with the new MacBook at first. It was telling me it would need to erase the curre

  • Dreamweaver cs4 work with Mavricks?

    Need to know if Dreamweaver CS4 works with new OS  Mavricks? Thanks.  email   [email protected]

  • Creating Physical Inventory at Material/Quant level

    Hi, Is it possible to do Physical inventory at material /quant level in the Warehouse management. We dont want to do cycle count. Is their a way to do physical inventory at material/quant level

  • Sorting folders by date

    How does one sort the folders with the library inspector by date and not name.

  • Is Java Compiler a part of JVM or JRE but not JVM? ?

    hi friends... i need clarification....I am completely confused about how things go about from d time v compile to execution...Please can anybody give me a complete description