Hostname from within PBL code
I would like to obtain the hostname for the server that BPM is running on in the code for an activity.
Any thoughts on how to do this?
The only way i know is to find out what other systems have the same mac address in the arp table:
arp -a |grep SPLA | grep bge0
bge0 server1.mydomain.de 255.255.255.255 SPLA 00:14:4f:80:ba:72
bge0 server4.mydomain.de 255.255.255.255 SPLA 00:14:4f:80:ba:72
bge0 server2.mydomain.de 255.255.255.255 SPLA 00:14:4f:80:ba:72
bge0 server3 255.255.255.255 SPLA 00:14:4f:80:ba:72
bge0 server5.mydomain.de 255.255.255.255 SPLA 00:14:4f:80:ba:72
this is an example executed inside a local zone ( server3 )
now you have all servers that can be one of your zones or the global zone.
i hope this will help you.
Similar Messages
-
Need to start JINI registrar instance from within the code
HI All,
I need to write JUnits for our app using JINI for which we need to start JINI registrar from within the code and then publish some services to it.
Any idea how we could be starting the JINI registrar from Java Code ? Any thoughts/suggestions/pointers would be highly appreciated.
Thanks in advance
VikramHi Senthil,
You can directly call the outer class method. Otherwise use the following way MyDialog.this.close(); (But there is no close() method in Dialog!!)
If this is not you expected, give me more details about problem.
(Siva E.) -
Hi There!
I am currently calling a vi from within my code. However, what i would like to do, is to pass it 2 int values when i call it and for it to return 2 int values when it is done!
Any advice on how i can do this please.
Thanks.
Regards,Hi Matrix,
is there a reason you do it this way? By Ref (it is called dynamically loading)
If you place the VI directly on the BD of a VI you can just wire things up.
Now if you need dynamically loading. hoover the open VI-ref function and right click on the type specifier and select create constant. Then right click browse, browse to your VI. Now you have the connector pane.
But if I were you I just use VI directly, because you'll keep connections active between the two VI's
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
How to get the Weblogic Server Id from within java code
I would like to log which server (among a cluster) a certain job is running on. Is there a way to get the server id from within Java code (this code is in a session bean if that is relevant.)
By server id I mean the "Name" column in the summary of servers on the weblogic console.
Thanks,
kenUse the two entries close to the bottom of the page: "list WebLogic
MBeans:listMBeans.jsp
display MBean attributes and operations:showMBean.jsp"
Nils
Anatoly wrote:
>
Cameron,
That page has these items on it:
which one do you think helps with my issue?
Misc WebLogic examples
LongRunningTask
Execute tasks in parallel using WebLogic Execute Threads
Weblogic stats (5.1)
Reload Servlet(s) programmatically (5.1)
Network classload from WebLogic:using reflection,or the launcher
Weblogic 5.1 debugging properties
Seppuku pattern readme
Using dynamic proxies to intercept EJB invocations (6.1)
list WebLogic MBeans:listMBeans.jsp
display MBean attributes and operations:showMBean
Thanks to Marcelo Caldas for filter by type option and nice UI!
Using com.sun.jdmk.comm.HtmlAdaptorServer with WebLogic 6.1
Cool
EJBGen
Dimitri
back
"Cameron Purdy" <[email protected]> wrote in message news:<3c7a745d$[email protected]>...
JMX ... see http://dima.dhs.org/misc/ for some info on JMX in Weblogic.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Anatoly" <[email protected]> wrote in message
news:[email protected]..
Does anyone know who to get the managing server URL's port
from within the EJB code running on Weblogic 6.1?
The URL port is not default (not 7001), but when creating
initial context, I am not specifying the URL in properties.
Due to that, trying to the the PROVIDER_URL property from
environment does not return anything.
Appreciate any responses.
-Anatoly
============================
[email protected] -
Execute shell command from within pascal code
Hello there,
I am trying to execute a shell command from within my pascal code. I use XCode together with FreePascal. I have tried something like:
exec ('program', 'options');
adding the 'Dos' unit to the Uses clause of my program.
Thus, e.g.,
exec ('mkdir', '/A')
to create a directory with the name 'A'.
However, my attempts so far were unsuccessful. Can anyone help me on this, and perhaps provide a simple example of how to do it right?
Thank you in advance,
ShaneIn the mean time, I found the problem myself. I am just posting the solution here for anyone that is interested. My original solution was correct, in that the 'Dos' Unit must be added, and that the right command is 'exec'. There was however a problem with the correct path to the program that I wanted to invoke. In the shell, this program was accessible from anywhere. However, in the 'exec' command, the full path to the program must be given. Since I am not a Unix expert, I don't know the reason for this.
So, in summary, the solution is:
Uses Dos;
begin
exec ('full path to program', 'program options');
e.g.: exec ('/bin/sh', '/run.sh') to process the commands in the file /run.sh
end
Hope this may be of help to anyone else.
Shane
Mac OS X (10.3.9)
Mac OS X (10.3.9)
Mac OS X (10.3.9) -
Signing Jars from within Java Code
Hi,
I would like to sign a jar file from within my Java code. Reason for this is that I wish to update a jar file at runtime, throw away the class loader that loaded the jar, and load the updated code inside a new classloader.
One problem, however: The jar file has to be signed before loading it. How can I do this from my Java program? Or do I need to have the jarsigner tool available at the location where I resign the jar?
Thanks in advance,
Ronald.Hi,
In the meantime I found an answer to my problem. In rt.jar there exists a class sun.security.tools.JarSigner, which can be used for exactly this purpose. Not completely portable, but it'll do the trick.
Ronald. -
Execute PL/SQL block with named binds from within java code?
Hi guys,
Is there any good way to execute my PL/SQL code, for example
BEGIN :x := :x+1; END;
from my Java code? I need nothing complicated, just static code block with named binds.
I have tried the Oracle exetnded JDBC (setXXXbyName methods):
public static void main(String[] args){ try { Class.forName("oracle.jdbc.driver.OracleConnection"); Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","user","password"); String SQL="begin :x:=:x+1; end;"; OracleCallableStatement stmt; stmt=(OracleCallableStatement)conn.prepareCall(SQL); stmt.setIntAtName("x", 5); stmt.registerOutParameter("x", Types.INTEGER); stmt.execute(); System.out.println(stmt.getInt("x")); } catch (Exception x) { x.printStackTrace(); } }
And get the java.sql.SQLException: operation not allowed: Ordinal binding and Named binding cannot be combined!
Then i've tried SQLJ appoach:
public static void main(String[] args){ try { Class.forName("oracle.jdbc.driver.OracleConnection"); Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","user","password"); Oracle.connect(conn); System.out.println("Connected!"); int x=3; #sql { BEGIN :x := :x+1; END; }; System.out.println("x=" + x); } catch (Exception x) { x.printStackTrace(); } }
And x=3 had retuned... Although 4 expected.
Then, I've set parameter sqlj.bind-by-identifier=true
And result is another exception! java.sql.SQLException: Missing IN or OUT parameter at index:: 2
Can you please mark my mistakes/point to correct solution?
Thanks in advance,
AlexeyFound another solution, this time working at least...
public void testPLSQL() {
String dynamicSQL=
"declare\n" +
" v_CursorID INTEGER;\n" +
" v_BlockStr VARCHAR2(500);\n" +
" v_Dummy INTEGER;\n" +
" v_x String(18);\n" +
"BEGIN\n" +
" v_CursorID := DBMS_SQL.OPEN_CURSOR;\n" +
" v_BlockStr :=?;" +
" DBMS_SQL.PARSE(v_CursorID, v_BlockStr, DBMS_SQL.V7);\n" +
" v_x:=?;"+
" DBMS_SQL.BIND_VARIABLE(v_CursorID, ':x', v_x,18);\n" +
" v_Dummy := DBMS_SQL.EXECUTE(v_CursorID);\n" +
" DBMS_SQL.VARIABLE_VALUE(v_CursorID, ':x', v_x);\n" +
" DBMS_SQL.CLOSE_CURSOR(v_CursorID);\n" +
" ?:=v_x;"+
" COMMIT;\n" +
"EXCEPTION\n" +
" WHEN OTHERS THEN\n" +
" DBMS_SQL.CLOSE_CURSOR(v_CursorID);\n" +
" RAISE;\n" +
"END DynamicPLSQL;";
try {
Class.forName("oracle.jdbc.driver.OracleConnection");
Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","user", "password");
System.out.println("Profit");
String SQL="begin :x:=:x+1; end;";
OracleCallableStatement stmt;
stmt=(OracleCallableStatement)conn.prepareCall(dynamicSQL);
stmt.setString(1, SQL);
int x=3;
stmt.setInt(2, x);
stmt.registerOutParameter(3, Types.INTEGER);
stmt.execute();
x=stmt.getInt(3);
System.out.println(x);
assertEquals(4, x);
} catch (Exception ex) {
ex.printStackTrace();
assertTrue(false);
}Now the only thing I need is to code some kind of preprocessor of SQL block, to prepare the dynamicSQL lair for SQL critter...
Please please please show me something less complicated! :8} -
Supress authentication check from within ABAP code
Hi,
we want all users to update their email-address in their own sap profile. (a self service)
By default, in the screen "System"->"User Profile"->"Own Data", he can update all except his email-id.
For this, we have written an abap report.
DATA: p_smtp TYPE TABLE OF bapiadsmtp WITH HEADER LINE,
p_return TYPE TABLE OF bapiret2 WITH HEADER LINE,
p_addressx TYPE bapiaddr3x.
data: p_uname TYPE xubname.
PARAMETERS: p_email TYPE ad_smtpadr OBLIGATORY.
p_uname = sy-uname. "logged in user
p_smtp-e_mail = p_email.
p_smtp-std_no = 'X'.
p_smtp-home_flag = 'X'.
p_smtp-consnumber = '001'.
p_addressx-e_mail = 'X'.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = p_uname
addressx = p_addressx
TABLES
return = p_return
addsmtp = p_smtp.
when we execute this report, with all rights, it works fine.
but a normal user when he executes, he is getting this error:
"You are not authorized to change users in group"
the su53 screen shows:
Authorization check failed
Object Class BC_A Basis: Administration
Authorization Obj. S_USER_GRP User Master Maintenance: User Groups
Authorization Field ACTVT Activity
02
Authorization Field CLASS User group in user master maintenance
<Dummy>
the point here is we cannot add User Maintenance rights to all our normal users.
is there any way, within the report (code) we can suppress the authentication check, programatically just while calling 'BAPI_USER_CHANGE', so that the user will be able to update his email-id.
thanks in advance,
Madhu_1980Here are 2 useful links:
http://www.sapdev.co.uk/fmodules/fms_updateaddress.htm
Updating email address in SU1/SU3
If these don't help the noly thing I can suggest is that you write your own bdc program.
Regards,
Warren. -
Getting hostname from inside Java code...
What is the easiest method to determine the hostname of the machine my appication is running on? Any code bits would be helpful.
Couldn't you use something like:
String host = getClass().getClassLoader().getResource(getClass() + ".class").getHost();
With applets you can just call getCodeBase() and do stuff with that, but I think the above might work regardless of whether the object is an applet or not. -
Fetch Unix process ID from within Java code
Hello,
if the title doesn't say it all, I need to programmatically get the PID of the JVM process running my application (for monitoring purpose, to ease correlation).
I found no way in lang classes System nor Runtime or Process. I hoped a system property would be provided, but no luck.
Any idea?
I'm using Java 6, on Windows, Solaris, and Linux.
Thanks in advance,
J.I'm not sure I understand. Until the JVM is started (from the host environment's point of view), I don't know its processID, so I can't put it on, say, the commandLine.
Once the JVM is started, I can fetch its process ID (at least on Unices, through a ps/grep/awk), but then I have to find a communication medium to feed the JVM with it (e.g. file).
That makes the application code dependant on the start script, plus other environmental issues (file path, etc.) that may hamper portability. Not to mention, in the File solution, the management of the crashes, when to delete/override the file,etc...
Some more questions:
1) is there any simpler solution on Unix/Linux than the ps/grep/awk (I'm far from an Unix guru) to get the PID?
2) is there any solution on Windows to get the PID from MS-DOS?
3) is there any other solution that does not involve the OS script language? I take it from my research, and your answer so far, that the answer is nope.
Brgds,
J. -
Set the value of a CWNumEdit Control from within the code
I am trying to update a CWNumEdit Control with data created during program execution. I am using the set_Text function but it does not seem to be working. I was wondering if there is something that I am missing to get this functionality to work. Please help.
I am developing a VS .NET 2003 WinForm GUI and am Using Measurement Studio 8.1.1.Hello mtd32610,
I noticed this question was already posted on this forum. We like to
keep all questions related to a single issue confined to one forum, so
please direct all future replies to one post or the other.
As Jervin_J mentioned in the previous post, the standard method for
updating a CWNumEdit control is to set the Value property of the
CNiNumEdit object that is associated with this control. You do not
need to call the set_Text function, in fact I am not familiar with any
set_Text function, so I think you may be calling this method on the
wrong class altogether.
You should have an object associated with your CWNumEdit control that
you can set the Value property for. As mentioned in the reply from
Jervin_J, the normal way to populate the control is to use:
<control>.Value = <numeric_value>;
Regards,
Marty H.
National Instruments -
Execute ABAP code from within SAPScript code
http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm
Hi
Do u have any question??? or are you trying to give suggestion???
If u have query how to call a report in script here is ur answer
The Form :
/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
ZKRPMM_PERFORM_Z1MEDRUCK.
DATA : BEGIN OF it_input_table OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
* déclaration de la table output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
* w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
* FORM CDE_CENT
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table INDEX 1.
MOVE it_input_table-value TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX 1.
output[] = it_output_table[].
ENDFORM.
Reward all helpfull anwers
Regards
Pavan -
Launching App Store from within code
Hi, does anyone know if the app store has a url link so I can open the App Store on the iPhone from within my code (for upgrading etc), to be used withe the openURL: method?
yes this works fine. This URL brings me to the Featured page of the App Store.
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewGenre?id=36&mt=8
Now I need to figure out if I can get to the Update tab in the App Store, which I really wanted so that I can get the user to jump there immediately if my app needs updating. -
Execute Javascript from our JAVA code
Hi all,
I have a question:
It's possible to execute a javascript code from the back bean page. For example , we execute a button action (Conect to a db, insert data) and if all it's ok we execute a simple alert ("The insert is ok!!");
Any way to do this??
Thx!I don't know enough about Javascript, but I don't think it can be executed from within Java code.
If you can't, an alternative is to provide a status code and/or status message that is accessible to the page. There are a number of ways to do this. One option is to put the information in a hidden field. Another option is to put the information in a session bean and add appropriate JSP code to your page to get that information.
You can link a Javascript function to the page's onLoad event. The function can get the status code/status message and create the alert. -
Is it possible to call an executable of compiled c code from within LabVIEW?
I can compile 'genesis' (the name of the code we are planning to use) under unix: it produces an executable which can be
linked to user-constructed c files which contain specific crossover and/or
mutation strategies, so once a user has the executable, it is not
neccesary to re-compile the main GA everytime a user mucks around with the
combination rules. I think that a question is, can you call the (or any)
executable from within LabView?
Thanks
Alan HomerYou can call executables using the System Exec VI, which can be found in the Communications palette.
Try to take over the world!
Maybe you are looking for
-
Oracle 11g installation issue on windows 2008 -64 bit
I have downloaded the Oracle DB Server software from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/111070-win64-2008soft-084715.html: Oracle Database 11g Release 1 (11.1.0.7.0) for Microsoft Windows Server 2008 x64 win64_11g
-
OK so I've recently placed some photos on iphoto that I would like to share with my other devices - ipad, iphone, apple tv. There doesn't appear to be anywhere on the could for photos - so that is my first question. My second question is how do I e
-
envelope wizard keeps printing from phototray. have changed setting to main tray in properties and cont. phototray???
-
My windows laptop suffered a serious crash. How can I transfer all music and content from iPhone to iTunes on new windows 8 laptop?
-
Pr. CC - Little problem with exportation
I got my video, it lasts around 40 mins. 2 cams. On editing I see audio and two video clips in sync, perfect. On my final exported mpg video, the first cam is little delayed and the the second is in sync. Why that? Here my exportation settings: mpeg2