Help!!! create & destroy CORBA object at run time
I am develop an program using CORBA (Java IDL and JDK 1.3 on Win 98 OS) that involved login-logout mechanism. Someone can login into my program, by access HTML file from the server machine that contained an applet, via browser (NN 6).
(the client and server run on same machine)
If somebody login, says Mr.X, and make mistakes by type an invalid password, my program still (can) work by opening a wrong account/record belong to other people who (login and) logout last time before Mr.X login. It is a wrong result.
I know the reason why this could be happen, its all because Java IDL support the CORBA transient object type. This transient object has the same lifetime as the execution of the server process that creates it. And it cause a problem for me.
According to the explanation above, i have some questions :
1. How to create, access, and destroy (delete) any CORBA object on demand (at run time) without have to shut down the server (process), in order to release any data/record hold by the CORBA object ?
2. If Java IDL cannot create and destroy a CORBA object on demand (at run time), how do I solve my problem above ?
If Java IDL cannot delete any CORBA object at run time, can it just delete any value (refresh data) that the object hold so any new data can be add again ?
3. if i run my program on 2 different machine, it result an error : COMM_FAILURE minor code 1398079490. How do I fix it ? any solution for this error ?
i really need any help, this program is my final project
i will appreciate any help and answers
thanks in advance
Marsel Hober
I'm using the POA implementation in java 1.4, but the api docs
aren't very helpful in terms of what all the various policy
values really do. I've got a servant that gets created by a
request on a different object, and needs to stay around until
the client tells it to go away. All the material that I've found
on how to use CORBA in Java is either pre-POA, or doesn't
cover any kind of management policies like servant retention.
Can someone tell me how to do this, or am I stuck trying to
wade through the CORBA 2.3 spec and hoping that I can
figure out how the stuff really works in Java?
Similar Messages
-
How to build sql query for view object at run time
Hi,
I have a LOV on my form that is created from a view object.
View object is read-only and is created from a SQL query.
SQL query consists of few input parameters and table joins.
My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
Thanks
Srikanth AddankiAs I understand you want to change the query at run time.
If this is what you want, you can use setQuery Method then use executeQuery.
http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_ -
How to get class name of a object in run time, from its accessible context.
Hi,
I need to get the class name of a java object in run-time, given the AccessibleContext of that object.
I gone through the AccessibleContext api documentation. but there is not way to get the class name for a java object using its AccessibleContext object.
Do any one have any idea how to get the class name of an java object, given its accessible object Accessible.
Thanks
Timberlake816311 wrote:
Please try to provide a solution for my requirement and avoid evaluating a requirement.
I am a curious guyit's great to be curious. however, in this situation, the requirement makes no sense in the given context. so, in an effort to be helpful, the people on this forum are asking you the reason behind the requirement. the reason we do this is because we have experience answering questions on this forum and, more often than not, requirements which don't make sense are the result of misunderstandings or confusion on the part of the person making the requirement. if we can figure out why you want to do what you want to do, we may be able to point you in a direction which makes more sense. -
Swing objects loaded run time but i want validate those so how do i vadidat
Swing objects loaded run time but i want validate those so how do i vadidate run objects
Validate what? (Is this the same Chandra that just left TDA?)
Message was edited by:
bsampieri -
JSP, Data Web Bean, BC4J: Setting the where clause of a View Object at run time
Hi,
I am trying to develop a data web bean in which the where clause of a View Object will be set at run time and the results of the query then displayed.
My BC4J components are located in one project while the coding for the data web bean is in another project. I used the following code bu t it does not work. Could you please let me know what I am doing wrong?
public void populateOSTable(int P_EmpId)
String m_whereString = "EmpView.EMP_ID = " + P_EmpId;
String m_OrderBy = "EmpView.EMP_NAME";
oracle.jbo.ApplicationModule appModule = null;
ViewObject vo = appModule.findApplicationModule("EMPBC.EMPAppModule").findViewObject("EMPBC.EMPView");
vo.setWhereClause(m_whereString);
vo.setOrderByClause(m_OrderBy);
vo.executeQuery();
vo.next();
String empName numAttrs = vo.getAttribute(EmpName);
System.out.println(empName);
Thanks.<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team (Laura):
Here is how I have usually done mine:
1. In the JSP, use a RowsetNavigator bean to set the where clause and execute the query.
2. Use a custom web bean to process the results of the query (print to HTML).
for example:
<jsp:useBean class="oracle.jbo.html.databeans.RowsetNavigator" id="rsn" scope="request" >
<%
// get the parameter from the find form
String p = request.getParameter("p");
String s = request.getParameter("s");
// store the information for reference later
session.putValue("p", p);
session.putValue("s", s);
// initialize the app module and view object
rsn.initialize(application,session, request,response,out,"wt_bc_WT_bcModule.wtjoinView");
// set the where clause string
String theclause = "presname = '" + p + "' AND slideno=" + s;
// set the where clause for the VO
rsn.getRowSet().getViewObject().setWhereClause(theclause);
rsn.getRowSet().getViewObject().executeQuery();
rsn.getRowSet().first();
%>
</jsp:useBean>
<jsp:useBean class="wt_bc.walkthruBean" id="wtb" scope="request" >
<%
// initialize the app module and VO
wtb.initialize(application,session, request,response,out,"wt_bc_WT_bcModule.wtjoinView");
wtb.render();
%>
In this case, the render method of my custom web bean mostly gets some session variables, and prints various content depending on the session variable values.
Hope this helps.
</jsp:useBean><HR></BLOCKQUOTE>
Laura can you give the code of your walkthru bean? i wna't to initialize a viewobject, set the where clause and give that viewobject back to initialize my navigatorbar.
Nathalie
null -
Can we create items dynamically or at run time?
Hello expert,
can we create some item dynamically at some button click?
Thanks
yashyash_08031983 wrote:
Hello expert,
can we create some item dynamically at some button click?Hello, yash
You can not create items at run time. But you can manage them at run time by setting Visible property programatically.
Hope this helps..
Hamid -
Unable to create CrystalReportViewer control programatically at run time
Hi
I'm not sure the best place to post this, so I'm placing it in Crystal Reports and BusinessObjects Enterprise.
I'm using Visual Studio 2010 to create a web application which will serve as a reporting portal for BOE XI 3.1.
I first installed Crystal Reports for Visual Studio 2010 and dropped a CrystalReportViewer onto a web form at design time.
However, when setting the ReportSource property, I was encountering memory corruption errors.
I've since read the release note and have realised that Crystal Reports for Visual Studio 2010 isn't compatible with BOE XI 3.1.
So, I've unistalled Crystal Reports for Visual Studio 2010.
Now I am trying to create the CrystalReportViewer at run time. I am able to successfully set the ReportSource property without getting memory corruption errors - which is good news, but I simply do not see the CrystalReportViewer control.
Here's my code:
WebForm1.aspx
<%@ Register assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
WebForm1.aspx.cs
protected void Page_Load(object sender, EventArgs e)
CrystalReportViewer myCrystalReportViewer;
myCrystalReportViewer = new CrystalReportViewer();
myCrystalReportViewer.ID = "CrystalReportViewer1";
myCrystalReportViewer.AutoDataBind = true;
myCrystalReportViewer.HasRefreshButton = true;
myCrystalReportViewer.ReportSource = @"C:\temp\myreport.rpt";
myCrystalReportViewer.DataBind();
Panel1.Controls.Add(myCrystalReportViewer);
Web.config
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="BusinessObjects.Enterprise.Providers, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
<add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="CrystalDecisions.Shared, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=B32731D11CE58905" />
<add assembly="CrystalDecisions.ReportSource, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
</assemblies>
</compilation>
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx"
type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
</httpHandlers>
Everything compiles and runs fine - I just don't see anything on my page.
I've tried adding a TextBox in exactly the same way and it displays just fine.
What am I doing wrong or not doing?
Surely it must be possible to add a CrystalReportViewer at run time.You left out the snippet of code that places the viewer in the HTML in the aspx file.
Is it there? That should describe its placement and sizing. The tag should be named CR:CrystalReportViewer (since you've set the TagPrefix to "CR").
Sincerely,
Ted Ueda -
Create LinkToAction with Image by run time
Hi,
I want to create linkToAction UI's with different images by run time. But if I try the code below I get always the same image for every linkToAction UI. What is my mistake? And how can I solve this problem?
for (int i = 0; i < wdContext.nodeGlob_Struc().size(); i++){
IWDLinkToAction linkToAction = (IWDLinkToAction)
view.createElement(IWDLinkToAction.class, "linkToAction"+i);
IPrivateDocPreAppView.ILinkToActionElement nodeLink =
wdContext.createLinkToActionElement();
wdContext.nodeLinkToAction().bind(nodeLink);
wdContext.currentLinkToActionElement().setImageSource(
wdContext.nodeGlob_Struc().getGlob_StrucElementAt(i).
getUrl_Thumbnail() );
linkToAction.bindImageSource( wdContext.nodeGlob_Struc().
getNodeInfo().getAttribute(IGlob_StrucElement.URL__THUMBNAIL) );
theGroupBox.addChild(linkToAction);
regards,
SharamHallo Sharam,
The Web Dynro binding model does not support "index binding". This means binding multiple image UI elments to the same attribute in a multiple context node (cardinaltiy 1..n) means, that all images are bound to the node's lead selection. That's what you implement with
linkToAction.bindImageSource( wdContext.nodeGlob_Struc(). getNodeInfo().getAttribute(IGlob_StrucElement.URL__THUMBNAIL) );
Armin's solution is based on the fact, that he breaks the data binding principle by directly setting the imageSource property values.
Sharam, when reviewing your code I find several "problems":
1. Never ever store UI elements in the context. I assume you do this in order to access UI elements outside wdDoModifyView() as it is static. There is no need to do this.
2. Then you break databinding by setting the imageSource property in the linkToAction object (stored in the context) directly, breaking databinding.
3.) Finally you "un-do" this hard property setting by binding it to the context again. This has the effect you described.
Breaking the data binding principle for UI elements has an important drawback. It also breaks the generic Web Dynpro caching mechanisms. Read my article on
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/301d715e-0b01-0010-1a8b-f1f83d175972">Best Practices for Building Client-Independent Web Dynpro UIs</a>, section Coding Rules, rule <i>Implement Fine-Grain UI Manipulations on Context but Not on UI Element Level</i>:
To maximize the rendering performance of your Web Dynpro application, implement all fine-grain UI manipulations on context instead of UI element level. This means do not call the setter-methods of UI element objects inside wdDoModifyView()directly but bind the related properties to the context and call the corresponding setter methods outside wdDoModifyView():
<b>Not:</b> wdDoModifyView(){ theField.setEnabled(true) }
<b>But:</b> wdDoInit(){ wdContext.currentFieldNode.setEnabled(true) }.
Otherwise Web Dynpros caching mechanisms cannot speed up the rendering of view layouts.
The view controllers wdDoModifyView() method is designed for a special purpose: the creation of a UI tree or UI sub-tree at runtime in case it is not possible to declare the UI at design time. The method is neither intended for fine-grain UI manipulations nor for context manipulations. Fine-grain UI manipulations are achieved via means of data binding. Context manipulations are done in wdDoInit(), action event handlers or event handlers.
Unfortunately, the name wdDoModifyView() is somewhat misleading since the purpose of it is to create (and not to modify) a UI tree dynamically. While the usage of wdDoModifyView() in order to create a UI tree initially (firstTime == true) is not performance critical, modifying an existing UI tree (firstTime == false) is: Changing only one single attribute of a single UI element within wdDoModifyView() flags the complete view containing the control as dirty and the complete view must be completely re-rendered again depending on the size and complexity of the view this can result in significant performance hits.
But in your case databinding cannot be applied, as index binding is not supported. The only databinding solution must use multiple/n nodes of cardinatliy 1..1 instead of 1 node of cardinality 1..n with no node elements. And this would require further coding for dynamic context node creation, copy logic based on value semantic.
Best Regards, Bertram -
HELP: create & use DynSequence object
Hi,
In order to create a dynSequence object, OMG specifies you have to use a
DynAnyFactoryHelper. I couldn't find such a class in the ORB included with
WebLogic Server 5.1.0.
I also couldnt find any WebLogic documentation explaining how to dynamically
create a DynSequence object. I'm sure it's possible. Anyone knows how or
where to find more information?
Thanks,
IlanWLS is not an ORB, so it does not support these interfaces.
ilan wrote:
Hi,
In order to create a dynSequence object, OMG specifies you have to use a
DynAnyFactoryHelper. I couldn't find such a class in the ORB included with
WebLogic Server 5.1.0.
I also couldnt find any WebLogic documentation explaining how to dynamically
create a DynSequence object. I'm sure it's possible. Anyone knows how or
where to find more information?
Thanks,
Ilan -
Hi,
I',m very new of EXCEL VBA programs, one of the pivot table able to run with out error.
but other getting error when i run it
below codes are automatically created by excel macro recorder.
if you help me out this situation, i really appriciated
Sub Macro11()
' Macro11 Macro
ActiveWorkbook.Worksheets("LCG-JKX").PivotTables("ThickCheckIn").PivotCache. _
CreatePivotTable TableDestination:="LCG-JKX!R17C64", TableName:= _
"PivotTable9", DefaultVersion:=xlPivotTableVersion15
Sheets("LCG-JKX").Select
CellS(17, 64).Select
ActiveWorkbook.ShowPivotTableFieldList = True
With ActiveSheet.PivotTables("PivotTable9")
.PivotFields("Thick(mm)").Orientation = xlRowField
.PivotFields("matTypeC").Orientation = xlPageField
End With
ActiveSheet.PivotTables("PivotTable9").ColumnGrand = False
Range("BL17").Select
ActiveSheet.PivotTables("PivotTable9").PivotSelect "", xlDataAndLabel, True
Selection.ClearContents
Range("BH18").Select
End SubYou can't have two pivot table with same name in a sheet. As the macro names pivot table as "Pi...9" always if you run 2nd time, macro will try naming with "Pi..9" again but is not allowed.
try changing only the first block.
ActiveWorkbook.Worksheets("LCG-JKX").PivotTables("ThickCheckIn").PivotCache. _
CreatePivotTable TableDestination:="LCG-JKX!R17C64", TableName:= _
"PivotTable" & [=round(Rand()*1000,0)], DefaultVersion:=xlPivotTableVersion15
Just added RAND to make the pivot table name unique.
Best Regards,
Asadulla Javed, Kolkata
Please do not forget to click “Vote as Helpful” if any post helps you and
"Mark as Answer”if it solves the issue. -
Setting data type of an object at run time
This is something of an advanced problem, so I hope there's
someone out there who can speak to this. I apologize for the length
of the post, I'm just trying to be clear about a rather unclear
conundrum. --
We all use arrays to hold collections of things. As you know,
an array is its self a type (Array) and so there is no way to
declare, for instance, an array of MovieClips or an array of
Strings. Heres what happens: lets pretend that we have 3 movie
clips clip1_mc, clip2_mc, and clip3_mc, and an Array called
anArray. so we can legally do this. anArray.push( clip1_mc );
anArray.push( clip2_mc ); anArray.push( clip3_mc );. An array of
size 3. Now the code: trace( typeof anArray[0] ); will output
"object." This can be a problem. If you try this: var
newClip:MovieClip = anArray[0]; you get a type mismatch from the
compiler. "Found Object where MovieClip is required." It
necessitates this: var newClip:MovieClip = MovieClip( anArray[0] );
Bummer no?
Ok. So fast forward. Lets assume a class List that uses an
array to hold the items in the list. So the class uses the Array
class in "composition." So you have methods like insert( ); and
retrieve(). Retriece() returns an item from an index in the array.
Because of the aforementioned problem, no matter what type the
thing was going into the list it comes out with type Object because
the retrieve function must return an item of some type, the only
option is to declare the return type of the retrieve() function as
Object. Lets say you know that this is a list of Strings. You could
write the retrieve()'s code like: return String( returnItem ); And
type the object "on the way out" .. but what if you want the list
to work with any type object, you would have to have a variable to
hold the desired type of objects in the list. And then as the
objects are being returned, you'd cast them to the type stored in
that variable. I guess that you'd pass the type to the constructor
of the List: var aList:List = new List( "AddressCard" ); -- That
should declare a List (Array) of AddressCards.
Is there a way to do this? have the type specified in casting
be dynamic?
And the flip-side of that is detecting the name of the class
of an object instance. The thing here would be to try to derive a
String from the name of the constructor function. (which is always
the class name) In actionscript 3 there is a service package--
mx.util -- I think, that has a function to return the qualified
class name of an object. But is there a jimmy rig for this in AS2?
My actual project does not use an Array to implement List. (
or Stack ) It uses a structure called a "linked list" - which is a
whole other topic, but same problem as with Arrays is also present
in the linked list versions and so requires the same solution. If
one is willing to type things explicitly when assigning an item in
the list to a variable of some type, this thing is quite excellent.
But I don't like it. I have the package with docs, code, sample
fla's, diagrams and everything that I would encourage people to
download, look at, try and whatever and then come back here with
any thoughts on it. There is a component with Flash professional
that is a list like structure, but it's so general that it crosses
the line into bloat. Ie: if you are using a list as a stack, you
only need getTop() and pop() and push() not all the other (12 or
so) methods in the class. Mine are patterned after structures from
the C++ standard template library. And the code style is C++, but I
think it's actually easier to read that way.
the files:
http://www.null.bz/ADL_Lib/ADT_Lib.zip
Thanks in advance, for your efforts! I really appreciate all
of it, helpful or not.First reactions:
>>var newClip:MovieClip = MovieClip( anArray[0] );
Even though you must use a cast to prevent the compile time
error, you don't get an error on this line because the compiler
skips typechecking for values accessed with the [] operator.
>>Is there a way to do this? have the type specified in
casting be dynamic?
Nope. You must effectively type check all objects used
through array elements yourself.
Reading on... -
Is it possible to create user-roles associations at run-time?
basically I need to be able to add a user to a role programmatically before the role-based content is displayed to the user.
Example: I have a role called 'Manager' created in the portal. When a user logs on, I detect that the user has the attribute 'job title' = 'Manager' so I add the user to the 'Manager' role and the portal shows the content for the 'Manager' role.Hi Umesh,
Yes, we can add users to the Role programatically.We did that.
Just see the below code to get some idea...
IUserFactory userFactory = UMFactory.getUserFactory();
IRoleFactory roleFactory = UMFactory.getRoleFactory();
IRole role = roleFactory.getRole(roleName);
String userId = "";
//Here userIDS is the list of user-id s to assign.
for (Iterator i = userIDS.keySet().iterator(); i.hasNext();) {
userId = (String) i.next();
role.addUserMember(userId);
Hope this helps you.
Cheers....
Satya
[Pl reward points if this is helpful] -
Help creating an interactive object
I want to create an interactive cube 10''x10"x10" that I can export to dreamwaver and put it on a website and the viewers can interact with it (move it around freely). I also want to have text on each side of the cube which moves with the cube and also want it to be able to zoom in and out.
This is a school project and my school has the adobe master collection so software is not a issue and my schol also has all of the autodesk products and i have the student versions of autodesk. I only have a timefram of a week and I dont know anything about programing, but I can follow a video or directions, please help?
I also want to create an inside version of cube (so it looks like you are in a cube and loking at the sides) and want that with text and be able to interact to.
Please Help?You might want to post your request at this link:
<http://forums.adobe.com/community/edge_animate?view=discussions>
This particular forum is to discuss matters about Adobe Forums in general!!
Good luck. -
How to create sub-directory by PL/SQL in run-time?
Hello,
I have directory defined in Oracle DB and I need to create a sub-directory by run-time PL/SQL code and move my file into the sub-directory.
The DB version is 10.2.0.3.0.
How can i do it without creating a new directory in DB each time i need to create a sub-directory?
Thanks!Or, as directory objects are replacable you can just change them using dynamic SQL...
e.g.
execute immediate 'create or replace directory my_home as ''/home''';
execute immediate 'create or replace directory my_home as ''/home/newfiles''';
of course this isn't going to work if the directly object is going to be used by multiple users at the same time, but if it's for a dedicated process then it would.
(it also relies on the operating system directories having appropriate read/write permissions, but that's outside the ability of Oracle to control)
Personally though, I'd avoid having things moving about dynamically.
The design of my process would specify where files are going to be located and the correct number of directory objects defined and created up-front.
Any 'incoming' files would have to be located in one of those known locations, whether that's under the control of the 'users' supplying the files, or some other process (o/s script maybe?) that receives the files and moves them to the known location. -
Creating customized run-time menus
I am trying to create a customized run-time menu when I right click on a tree control. I can disable the existing run-time/pop-up menu but would like the ability to use a different customized menu.
I can simulate a run-time menu by using creating a VI that functions in a manner similar to the menu but would prefer the ability to create and process and customized run-time/pop-up/floating menu.
The menu is always of a fixed size with all items enabled. I do not need the ability to modify this menu within the application.There is an LTR article by David Ritter called "Contextual Pop-Up Menu Programming" that shows a method similar to yours. It is well worth a look.
-Jim
Maybe you are looking for
-
Best ISP for iMac/Macbook e-mail?
I already have a G4 iMac and have a new (so far unopened) MacBook. I want to change my ISP from Demon to something less expensive and more adaptable. I haven't opened up the MacBook yet because I want to start from an ISP that's already in place.Any
-
Creating a transformation for delivered datasource 0TCTPRCSVAR_TEXT
Hi, I am trying to set up my delivered technical content for the BI Administrator cockpit (all the 0TCT... objects). Everything is working well except for 4 datasources: 0TCTBWOBJCT_ATTR 0TCTBWOBJCT_TEXT 0TCTPRCSVAR_ATTR 0TCTPRCSVAR_TEXT While all
-
i successfully installed boot camp on my apple macbook air the setup initiated but the system was unable to futher install as it could not recognize the hard drive format i restarted the mac now it shows the error no portable device please insert boo
-
Topology Built from Spatial Geometries
Hello, I am trying creating topology from example: CREATE TABLE city_streets6_geom ( -- City streets/roads name VARCHAR2(30) PRIMARY KEY, geometry SDO_GEOMETRY); CREATE TABLE traffic_signs6_geom ( -- Traffic signs name VARCHAR2(30) PRIMARY KEY, geome
-
Address book unexpectedly quitting
Whenever I go to add a new contact in Address Book, it "unexpectedly quits". I've tried moving the preferences folder to the desktop, then logging out and logging back in to see if it was a preference problem, but it didn't do anything. Then I tried