Inter-Process communication
I was looking for alternative to message queue for passing messages because I'm hitting the maximum message size limit.
what are my other options and what would be the pros and cons. the code is in C/C++. Thanks.
Since you don't mention what OS you are using, or which message-passing scheme, it's hard to provide any advice.
If you are using Solaris, you are more likely to find a helpful answer in a Solaris programming forum:
http://www.opensolaris.org/jive/index.jspa
As to C versus C++, I don't think the pros and cons are different for message passing than for most other kinds of programming. The C interfaces can be used just as easily in C++.
Personally, I prefer programming in C++ because of better type safety and economy of expression, and because it is easier to write efficient yet maintainable code. But other considerations might make C a better choice for a specific project. For example, if this one module would the only C++ code in the application, you probably would want to stay with C.
Similar Messages
-
Inter-process communication with VB6 application
I want to have my C# application communicate with VB6 application program.
The message to communicate is simple. Here is a scenario.
VB6 APP C# APP
Run C# APP "1", "2" or "3"
Send command ---------------->
Wait Do work as the command
Exit from loop <---------------- Return code
Terminate
I implemented this with Profile(ini file) but I want to do without file writing.
Which way would be desirable?If vb6 is using process.start ( or whatever the equivalent is ) to crank the c# application up then you could just use command line arguments to pass the variable in.
A simple way to pass data between processes is ms message queue.
You have a queue for each direction you want to send stuff.
You could use a mix of these.
Pass in args to the c# app then listen for messages on a queue and the c# app pushes the return code onto that queue.
https://msdn.microsoft.com/en-us/library/aa288457%28v=vs.71%29.aspx?f=255&MSPPError=-2147217396
public class CommandLine
public static void Main(string[] args)
// The Length property is used to obtain the length of the array.
// Notice that Length is a read-only property:
Console.WriteLine("Number of command line parameters = {0}",
args.Length);
for(int i = 0; i < args.Length; i++)
Console.WriteLine("Arg[{0}] = [{1}]", i, args[i]);
https://msdn.microsoft.com/en-us/library/ms711472(v=vs.85).aspx
Hope that helps.
Technet articles: Uneventful MVVM;
All my Technet Articles -
Multiple application instances and inter process communication.
Hi,
I am looking at having a main application instance spawn individual application instances. But when launching another instance I need to message the main application so it can spawn a window.
How do I go about communicating between application instances in order to do this ?
Many thanks in advance,
AaronRMI is your best bet - or, if the IPC is pretty simple, then you could just open a simple socket listener in the primary app...
- K -
Threaded VI, Threaded Sequence inter process communication best practice
I'm curious if others have any advice on best practice for the following.
We have VIs that run continuously during our test execution sampling 4 different Analog Input boards in continous mode. For quite awhile these VIs were passed the SequenceContext from the TS side along with the name of FileGlobals. When the while loops had new samples from the boards it would use the SequenceContext to set them from the VI. It would also use the SequenceContext to get "signals" from test stand. That is, I'd set a variable on the TestStand side that would be read in the VI to make it behave differently (filtering, moving average, etc). I used TS notifiers from the LV side to let TS know new data was available and there are TS rendezvous's used to partially synchronize the 4 seperate boards with each other.
We never really had any trouble with this and even though the code wasn't terribly complicated for me, others on the team have had a little trouble comprehending it.
Recently, we ran into some issues not related to this code but ultimately in an attempt to solve them I ended up re-writing this code to use functional globals. Now, the VI uses the FGs to set the data and on the TestStand side the same FGs are used for reading. Locking of data is handled by the non-rentrant VIs. The FGs are also structured state machine-like for signaling the VI to do something and letting TS know something has happened.
This code seems to work well also and I think my team (and anyone that follows) will be able to follow this code a little bit easier.
I'm not classically trained so I suspect there may be standard patterns that work here, I just haven't sought them out.
Is there a better way to do this that I'm not thinking of?Hi SmokeMonster,
If things are looking more legible and everything functioning as desired it sounds like the improvements are going to be some of the best for your company. Without more specific information about seeing how information is being passed and handled, and a greater knowledge of the system and desired results, specific recommendations are going to be more difficult.
From a higher level overview, the best resources you will find on development practices will be the NI TestStand Materials. A few that may be worth a look specific to your inquiry would be the following:
Using LabVIEW with TestStand
http://digital.ni.com/manuals.nsf/websearch/828A615BAB7CCECA86257A150065C12E
TestStand System and Architecture Overview
http://digital.ni.com/manuals.nsf/websearch/49D1BDF3B02279A8862579FB0063EC04
TestStand Advanced Architecture Series
http://www.ni.com/white-paper/7022/en
Hopefully that gets you some good starting points to refer from.
Regards,
James W.
Applications Engineer
National Instruments -
Inter portlet communication in SP4
Can any one tell me in step by step process with sample code to do inter portlet communication in SP4
Here i have 2 portlets
Portlet A and portlet B
Portlet A has 2 hyperlinks link1 and link2
When i click link1 or link2 in portlet A, i am passing a parameter,depends on the paramater i have to display some details in portlet B
Thanks
maria
[email protected]
Message was edited by marianair at Feb 10, 2005 2:27 AMhi,
implement both portlets as page flow portlets. For both the links in portlet A, implement an action that generates an event and fires thisone. Then let the pageflow in portlet A show whatever content is appropriate, eg. the same as before the link.
Portlet B cathces this event and in the connected pageflow action does whatever it needs to do and redirects to the appripriate JSP.
Just remeber that you probably needs to use a custom event here.
For details on IPC and events, see doc:
http://e-docs.bea.com/workshop/docs81/doc/en/portal/howdoi/howInterPortletComm_wkshp.html
As an alternative you can use the SP3 mechanism, I find thisone somewhat more cumbersome and messy.
http://e-docs.bea.com/workshop/docs81/doc/en/portal/howdoi/howInterPortletComm.html
Feel free to post follow-ups if you get stuck.
- Anders M. -
How to look at inter-process messages
Automator has Mail actions called "Get Selected Mail Messages" and "Get Attachments From Mail Messages", etc. It's easy enough to view Mail's dictionary in Applescript Editor and guess what it is doing, but it would be more direct to watch the message flow. Is there some utility to "watch" the inter-process messages that go between applications?
A good idea. I look at the logs for many things, but didn't think to for this.
In system.log, all I see related to Automator or Mail are events unrelated to what I am doing and they look like:
Automator[3268]: The action “Initiate Remote Broadcast” could not be loaded because the application “QuickTime Broadcaster” was not found.
Mail[554]: Periodic CFURLCache Insert stats (iters: 2003) - Tx time:0.004129, # of Inserts: 1, # of bytes written: 43, Did shrink: NO, Size of cache-file: 17963008, Num of Failures: 0
similar results looking at Console Message or All Messages. Nothing new appears in the logs if I run the Automator workflow. I do see every NSLog() message issued by the programs I am writing, so maybe Automator and Mail do not NSLog anything.
Is there any process running that handles IPC or is it direct communication? -
Failed to open Inter-Controller Communication Channels! Stk6000
Hi pros,
I have a problem while replacing a new controller. My storage 6180 have 2 controller A ( OK ) - B ( failed ). I power off storage than replacing controller B by a new controller.
Now, i cannot access to controller A through serial console. F/W controller A: 7.60.x.x
I can access to controller B through serial console and CAM which show all drive is incompatible and unassigned, no volumes, no virtual disk. F/W controller B: 7.80.x.x
Controller B message shows Failed to open Inter-Controller Communication Channels!
I searched google and MOS but still have not find any solution for this problem. I will appreciate for any helps.
This is log file from serial controller B
09/22/02-12:03:37 (tRAID): WARN: Failed to open Inter-Controller Communication Channels!
09/22/02-12:03:37 (tRAID): NOTE: LockMgr Role is Master
09/22/02-12:03:38 (utlTimer): NOTE: fcnChannelReport ==> 0 1
09/22/02-12:03:40 (tHckReset): NOTE: HealthCheck: Alt Ctl: 1 Reset_Failure, state: 0 Start
0x8f9084 (tNetCfgInit): miiPhyInit check cable connection
09/22/02-12:03:49 (tNetCfgInit): NOTE: eth1: LinkDown event
09/22/02-12:03:49 (tNetCfgInit): NOTE: Network Ready
09/22/02-12:04:07 (tRAID): NOTE: WWN baseName 00040080-e5185e0e (valid==>SigMatch)
09/22/02-12:04:07 (tRAID): NOTE: spmEarlyData: No data available
09/22/02-12:04:08 (tRAID): SOD: Pre-Initialization Phase Complete
09/22/02-12:04:09 (utlTimer): NOTE: fcnChannelReport ==> 0 1 ~2 -3
09/22/02-12:04:14 (utlTimer): NOTE: fcnChannelReport ==> 0 1 ~2 =3
09/22/02-12:04:39 (utlTimer): NOTE: fcnChannelReport ==> 0 1 2 =3
09/22/02-12:04:40 (tHckReset): NOTE: HealthCheck: Alt Ctl: 4 Norun_Failure, state: 0 Start
09/22/02-12:04:40 (tHckReset): NOTE: HealthCheckManager: Notify Event 6 Ctl_Not_Running
09/22/02-12:04:40 (cmgrEvent): WARN: Alt Ctl Reboot:
Reboot CompID: 0x407
Reboot reason: 0x6
Reboot reason extra: 0x0
09/22/02-12:04:40 (cmgrEvent): NOTE: holding alt ctl in reset
09/22/02-12:04:40 (cmgrEvent): NOTE: HealthCheck: Alt Ctl: 1 Reset_Failure, state: 0 Start
09/22/02-12:04:42 (utlTimer): NOTE: fcnChannelReport ==> +0 1 2 =3
09/22/02-12:04:43 (utlTimer): NOTE: fcnChannelReport ==> 0 1 2 =3
09/22/02-12:04:46 (tRAID): WARN: pcm::CapabilityManager::validateAdoption exception (DbmWriteException: recType: 85, status: -12)
09/22/02-12:04:46 (tRAID): WARN: dbm::RWFileSystem::initialize: Exception caught, ConstructorIOException: -16
09/22/02-12:04:46 (tRAID): ERROR: In PersistenceManager::initialize: catch DbmNoFileSystemException: recType: 84
09/22/02-12:04:46 (tRAID): ERROR: ADM Load Reservations failed with error (5) Exception
09/22/02-12:04:46 (tRAID): NOTE: ACS: Icon ping to alternate failed: -2, resp: 0
09/22/02-12:04:46 (tRAID): NOTE: ACS: autoCodeSync(): Process start. Comm Mode: 0, Status: 0
09/22/02-12:04:46 (tRAID): WARN: ACS: autoCodeSync(): Skipped since alt not communicating.
09/22/02-12:04:46 (tRAID): WARN: DbmNoFileSystemException: recType: 59 Line 1819 File cmgrControllerMgr.cc
09/22/02-12:04:46 (tRAID): WARN: DbmNoFileSystemException: recType: 59 Line 1819 File cmgrControllerMgr.cc
09/22/02-12:04:46 (tRAID): SOD: Code Synchronization Initialization Phase Complete
09/22/02-12:04:46 (sntpEvent): NOTE: sntpEventHandler: VNI_GET_SYNC_TIME failed
09/22/02-12:04:47 (tRAID): WARN: USM Exception caught in processUsmHeader - DbmNoFileSystemException: recType: 30
09/22/02-12:04:47 (tRAID): WARN: USM Error allocating UsmStableStorageHeader in processUsmHeader() - DbmNoFileSystemException: recType: 30
09/22/02-12:04:47 (tRAID): NOTE: SOD failure in evf::VolumeCfgManager::initialize
09/22/02-12:04:47 (tRAID): NOTE: DbmNoFileSystemException in evf::VolExtentMgr::initialize
09/22/02-12:04:47 (tRAID): NOTE: DbmNoFileSystemException in safe::initialize
09/22/02-12:04:47 (tRAID): ERROR: Caught DbmNoFileSystemException: recType: 95 in initialize
09/22/02-12:04:47 (tRAID): WARN: edrSOD: No Config File System
09/22/02-12:04:48 (tRAID): WARN: snrProcessDatabase: No File System Found
09/22/02-12:04:48 (tRAID): WARN: spm::SPMManager::initialize NoFileSystem
09/22/02-12:04:48 (tRAID): NOTE: fcn: Peering Disabled (Alt Unavailable)
09/22/02-12:04:48 (tRAID): NOTE: ion: Peering Disabled (Alt Unavailable)
09/22/02-12:04:48 (tRAID): WARN: Error in updating in memory dq cfg!
09/22/02-12:04:48 (tRAID): WARN: Caught DbmNoFileSystemException: recType: 65 in fbm::initialize
09/22/02-12:04:48 (tRAID): WARN: MelMgr::initialize FAILED: Exception Line 2197 File mlmMelMgr.cc
09/22/02-12:04:48 (tRAID): WARN: readDatabaseSyslogConfig: Caught Exception DbmNoFileSystemException: recType: 74 Line 420 File mlmSyslogMgr.cc
09/22/02-12:04:48 (tRAID): WARN: Syslog database access failed: Exception at Line 324 File mlmSyslogMgr.cc
09/22/02-12:04:49 (tRAID): WARN: Unable to intialize mirror device
09/22/02-12:04:49 (tRAID): NOTE: CacheMgr::cacheOpenMirrorDevice:: mirror device 0xfffffff
09/22/02-12:04:49 (tRAID): WARN: CacheStore::read(,): Exception DbmNoFileSystemException: recType: 24
09/22/02-12:04:49 (tRAID): WARN: CCM: readAndValidateCacheStore() caught CacheStoreDataException
09/22/02-12:04:49 (tRAID): NOTE: CCM: readAndValidateCacheStore() recovering
09/22/02-12:04:49 (tRAID): NOTE: CCM: readAndValidateCacheStore() partitioning for no mirroring
09/22/02-12:04:49 (tRAID): WARN: CacheStoreExt::read(,): Exception DbmNoFileSystemException: recType: 82
09/22/02-12:04:49 (tRAID): WARN: CCM: readAndValidateCacheStore() cacheStoreExt read exception
09/22/02-12:04:49 (tRAID): NOTE: CCM: readAndValidateCacheStore() initializes with default values
09/22/02-12:04:49 (tRAID): NOTE: CCM: Changing default demand cache flush values
09/22/02-12:04:49 (tRAID): NOTE: CCM: validateCacheMem() cache memory is invalid
09/22/02-12:04:49 (tRAID): NOTE: CCM: validateCacheMem() Initializing my partition
09/22/02-12:04:50 (tRAID): NOTE: CacheStore::write(): Exception DbmNoFileSystemException: recType: 24
09/22/02-12:04:50 (tRAID): WARN: CCM: initialize() caught exception(2) CacheStoreDataException
09/22/02-12:04:50 (tRAID): NOTE: CCM: sodClearMOSIntentsAlt(), failure clearing MOS intents on alt
09/22/02-12:04:52 (tRAID): WARN: Exception caught in presMgrInit - DbmNoFileSystemException: recType: 12
09/22/02-12:04:52 (tRAID): NOTE: DbmNoFileSystemException in vdm::CrushDriveManager::initialize
09/22/02-12:04:52 (tRAID): NOTE: DbmNoFileSystemException in vdm::DriveManager::initialize
09/22/02-12:04:52 (tRAID): NOTE: DbmNoFileSystemException in vdm::VolumeGroupManager::initialize
09/22/02-12:04:52 (tRAID): NOTE: DbmNoFileSystemException in vdm::DacstoreVolManager::initialize
09/22/02-12:04:52 (tRAID): NOTE: DbmNoFileSystemException in vdm::PieceManager::initialize
09/22/02-12:04:52 (tRAID): NOTE: DbmNoFileSystemException in vdm::CrushStripeManager::initialize
09/22/02-12:04:52 (tRAID): NOTE: DbmNoFileSystemException in vdm::exop::ExclOpManager::initialize
09/22/02-12:04:52 (tRAID): WARN: CCM: initComplete() - isRestoreInProgressAlt caught IconSendInfeasibleException Error
09/22/02-12:04:52 (tRAID): NOTE: CacheStore::write(): Exception DbmNoFileSystemException: recType: 24
09/22/02-12:04:52 (tRAID): WARN: CCM: initComplete() caught(2) CacheStoreDataException
09/22/02-12:04:53 (tRAID): NOTE: DiagVolManager::initialize: Exception - Alt controller not ready
09/22/02-12:04:53 (tRAID): ERROR: dbm: SubRecInterface::save caught DbmNoFileSystemException: recType: 58 - recType: 58, txn: 0x03b0de7c
09/22/02-12:04:53 (tRAID): ERROR: dbm: SubRecInterface::save caught DbmNoFileSystemException: recType: 58 - recType: 58, txn: 0x03b0de7c
09/22/02-12:04:53 (tRAID): WARN: Caught DbmNoFileSystemException: recType: 57 in sam::StorageArrayManager::initialize
09/22/02-12:04:55 (tRAID): SOD: Initialization Phase Complete
09/22/02-12:04:53 (ProcessHandlers): WARN: Exception caught in WWNStorage iosReleased: DbmNoFileSystemException: recType: 9
09/22/02-12:04:53 (ProcessHandlers): WARN: dbm::WWNStorage::iosReleased() FAILED.
==============================================
Title: Disk Array Controller
Copyright 2008-2011 LSI Logic Corporation, All Rights Reserved.
Name: RC
Version: 07.80.51.10
Date: 10/03/2011
Time: 15:49:14 CDT
Models: 4980 4981 4985 4988
Manager: devmgr.v1080api06.Manager
==============================================
09/22/02-12:04:56 (tRAID): sodMain Normal sequence finished, elapsed time = 112 seconds
09/22/02-12:04:56 (tRAID): sodMain complete
09/22/02-12:05:06 (ProcessHandlers): WARN: Drive 0x10000 will be marked incompatible as DSM detected error: 12
09/22/02-12:05:06 (ProcessHandlers): ERROR: dbm: SubRecInterface::read caught DbmNoFileSystemException: recType: 84 - recType: 84, txn: 0x03b0df9c
09/22/02-12:05:08 (utlTimer): WARN: Extended Link Down Timeout on channel 3
09/22/02-12:05:10 (ProcessHandlers): WARN: DbmNoFileSystemException: recType: 35 Line 6404 File cmgrControllerMgr.cc
09/22/02-12:05:10 (ProcessHandlers): WARN: DbmNoFileSystemException: recType: 35 Line 5444 File cmgrControllerMgr.cc
09/22/02-12:05:10 (ProcessHandlers): WARN: CCM: backupStorageAvailableAlt() caught IconSendInfeasibleException Error
09/22/02-12:05:10 (ProcessHandlers): NOTE: SYMbol available
09/22/02-12:05:12 (ProcessHandlers): SOD: sodComplete Notification Complete
09/22/02-12:05:10 (PersistentRestore): NOTE: PSTOR: PstorRecordManager::readRecord data block not found
09/22/02-12:05:10 (PersistentRestore): WARN: IOManager::readBackupStatus - Pstor record does not exsit
09/22/02-12:05:10 (PersistentRestore): NOTE: IOManager::getBackupDataSize - read to pstor failed
09/22/02-12:05:10 (PersistentRestore): WARN: ddcDq & ddcTrace restore abandoned: nothing to recover
09/22/02-12:05:10 (PersistentRestore): WARN: PSTOR: PstorRecordMgr: removeRecord failed
09/22/02-12:05:10 (PersistentRestore): WARN: IOManager::readBackupStatus - Pstor record does not exist
09/22/02-12:05:10 (PersistentRestore): NOTE: DDC Restore Failed
09/22/02-12:05:10 (PersistentRestore): NOTE: IOManager::restoreData - m_DataSize:0x500000, m_StartAddress:0x3b0e320
09/22/02-12:05:10 (PersistentRestore): NOTE: IOManager::restoreData - Successful
09/22/02-12:05:10 (PersistentRestore): NOTE: ncb::IOManager::restoreData - Successful
09/22/02-12:05:10 (PersistentRestore): NOTE: DQ Restore Completed
09/22/02-12:06:10 (ProcessEvents): WARN: RAIDVolumeManager::updateAltMountStates, caught IconSendInfeasibleException Error
09/22/02-12:18:25 (utlTimer): NOTE: fcnChannelReport ==> 0 +1 2 =3
09/22/02-12:18:32 (utlTimer): NOTE: fcnChannelReport ==> 0 -1 2 =3
09/22/02-12:18:35 (IOSched): NOTE: Extended Link Down ==> Chan 1
09/22/02-12:18:42 (utlTimer): NOTE: fcnChannelReport ==> 0 +1 2 =3
09/22/02-12:21:23 (utlTimer): NOTE: fcnChannelReport ==> +0 1 2 =3
09/22/02-12:21:38 (utlTimer): NOTE: fcnChannelReport ==> +0 1 2 =3
09/22/02-12:22:37 (utlTimer): NOTE: fcnChannelReport ==> +0 1 2 =3
09/22/02-12:22:55 (tSubSys): NOTE: HealthCheck: Alternate controller removal
09/22/02-12:22:55 (tSubSys): NOTE: HealthCheckManager: Notify Event 5 Ctl_Removed
09/22/02-12:22:56 (utlTimer): NOTE: fcnChannelReport ==> -0 1 2 =3
09/22/02-12:23:00 (IOSched): NOTE: Extended Link Down ==> Chan 0
09/22/02-12:23:01 (utlTimer): NOTE: fcnChannelReport ==> =0 1 2 =3
09/22/02-12:23:24 (IOSched): WARN: Extended Link Down is over on channel 0 - lasted 29 seconds
09/22/02-12:23:25 (utlTimer): NOTE: fcnChannelReport ==> +0 1 2 =3Hi,
I tried to insert lock-controller, manually place offline and online. It show OK on CAM for some minutes before back to be ERROR.
I feel this controller become ERROR instead of being lock-down as before. Perhaps we should ask for a replacement because nothing we can intervene to the hardware. This is log file.
9/29/02-07:37:15 (symTask2): NOTE: setControllerToFailed_1: Failing alternate controller
09/29/02-07:37:25 (symTask1): NOTE: setControllerToOptimal_1: Setting alternate to optimal
09/29/02-07:37:25 (symTask1): NOTE: buc controllerAltStateChanged
09/29/02-07:37:25 (symTask1): NOTE: releasing alt ctl from reset
09/29/02-07:37:26 (tHckReset): NOTE: HealthCheck: Alt Ctl: 1 Reset_Failure, state: 0 Start
09/29/02-07:37:28 (ccmEventTask): NOTE: vdm::syncRequired(): Begin
09/29/02-07:37:28 (ccmEventTask): NOTE: vdm::syncRequired(): Complete, elapsed time = 0 seconds
09/29/02-07:37:29 (ccmEventTask): WARN: CCM Failed to notify the alternate to update Cache Store in pstor, writeCacheStoreToPstor() caught IconSendInfeasibleException Error
09/29/02-07:37:29 (ccmEventTask): WARN: CCM Failed to notify the alternate to update Cache Store in pstor, writeCacheStoreToPstor() caught IconSendInfeasibleException Error
09/29/02-07:38:26 (tHckReset): NOTE: HealthCheck: Alt Ctl: 4 Norun_Failure, state: 0 Start
09/29/02-07:38:26 (tHckReset): NOTE: HealthCheckManager: Notify Event 6 Ctl_Not_Running
09/29/02-07:38:26 (cmgrEvent): WARN: Alt Ctl Reboot:
Reboot CompID: 0x407
Reboot reason: 0x6
Reboot reason extra: 0x0
09/29/02-07:38:26 (cmgrEvent): NOTE: holding alt ctl in reset
09/29/02-07:38:27 (cmgrEvent): NOTE: HealthCheck: Alt Ctl: 1 Reset_Failure, state: 0 Start
09/29/02-07:38:28 (utlTimer): NOTE: fcnChannelReport ==> 0 +1 2 =3
09/29/02-07:38:33 (ccmEventTask): WARN: CCM Failed to notify the alternate to update Cache Store in pstor, writeCacheStoreToPstor() caught IconSendInfeasibleException Error
09/29/02-07:38:34 (ccmEventTask): WARN: CCM Failed to notify the alternate to update Cache Store in pstor, writeCacheStoreToPstor() caught IconSendInfeasibleException Error -
Inter-Portlet Communication Best Practices
Here's the situation:
There are 2 Portlets on a page; a Search Portlet and a List Portlet. When a user selects search criteria in the Search Portlet and presses the Submit button the items displayed in the List Portlet must be updated to reflect the search criteria that was entered.
My approach to implementing this:
When the user presses the Submit button the Search Portlet code will take the information entered by the user and create a searchObj. This searchObj will be attached to the Http Session object. When the Search Portlet is rendered again in the browser it will recognize (via a hidden HTML attribute) that it needs to inform the List Portlet that there is new search criteria. The browser will then generate a Portal Event that will cause the List Portlet to refresh its list based on the searchObj it finds attached to the Http Session object.
Question 1:
Assuming this is a reasonable approach how do I get the Search Portlet to generate an event based on a HTML hidden field at the time the Portlet is rendered?
Question 2:
Is there a better way to implement this type of functionality? Essentially the problem is that one Portlet needs to process some data and once it's done it needs to notify other Portlets. What are the best practices for this type of situation?
Any suggestions are welcome.Hi,
As per the JSR 168 Specification, we follow PortletSession with APPLICATION_SCOPE for implementing IPC ( inter portlet communication ).
Here are the steps for IPC:-
1. When you press submit from search portlet then fetch the search string value into the processAction method of the search portlet.
2. Put the search string value in the portlet session with APPLICATION_SCOPE.
3. When you press submit of search portlet, doView() method of both the portlets
( Search and List ) will be called.
4. in the doView() method of List portlet retrieve the search string from the portlet session and call the business logic based on the search criteria.
5. Put the search result into bean or as per your framework design.
6. Iterate the bean value on to your List portlet rendering jsp.
Note:-Here it is assumed that both the portlets are in the same ear/war.
The coming JSR 286 specification, allows a portlet to send and receive events and perform state changes or send further events as result of processing an event.
In JSR 286, we would be having one more request and reponse called EventRequest and EventResponse.
Comments and suggestions are welcome for IPC.
Thanks
<Neeraj Sidhaye/>
Try_Catch_Finally AT YAHOO DOT COM
http://ExtremePortal.blog.co.uk -
Inter servlet communication......is it possible ?
here i have posted "Inter servlet communication......is it possible ?"
have u come across this ?
http://forum.java.sun.com/thread.jspa?threadID=588996
thank yousorry for the cross post. It wont be again. In fact i refered the link if anybody could give some comment. i saw some poster also post questions from diffrent topics of java.
My english is not good .
But why you are so tough on me ? you are targetting me in some of my posts. you have been helping learners for a long time . Old archieve /posts prove that. I dont claim my post are expert level. If you feel those are too simple for you plz ignore that.
thank you -
Secure inter-session communication
How to pass data from one session to another session of same user?
I mean how to pass it a way that nobody else can intercept?
Oracle's DBMS_PIPE private pipes are not secure enough, SYSDBA can read/write from/to anybody's private pipe. :(.
Any ideas?Why use DBMS_PIPE ?this was first that came to me for inter-session communication.
What is the actual requirement that needs to be met? Actual requirement is to provide a session with crypto-key(s) from outside of Oracle, transparently to applications, and so that even SYSDBA could not get the keys.
The session should use crypto-key in a same manner as VPD does to encrypt/decrypt some sensitive columns transparently to applications and adhoc reports (via layer of views that use the key).
What is the purpose of those sessions communicating with one another? My first idea was to create a crypto-function that initially (when key is null) listens from pipe to get a key value from it.
Another session of same user should send the key entered by the user into this pipe.
Then, after the key received, the first main session proceeds having key in its package memory (or context).
The problem here is that SYSDBA can mount a man-in-the-middle attack, quickly reading the key from pipe and writing it back.
Why does that need to be secure? What data will be send? Is this peer-to-peer or client-server?SYSDBA should not know values from sensitive columns. Only users that have a key should.
DBMS_PIPE is a solution. Not really.
So it is difficult to comment on your view that DBMS_PIPE is insecure, when not knowing what the actual requirement is. I thought that the fact that SYSDBA can access any pipe is enough to see it is not 100% secure.
Currently I am looking into externally or globally initialized contexts. Without that supplemental session where user enters a key.
I am not sure yet if it is a right direction. -
Event interface for inter-portlet communication
In which jar file can I find the com.bea.netuix.events.Event interface?
I wish to offer some support for inter-portlet communication while running inside a 8.1sp4 weblogic portal server.
Firstly, there is almost no documentation for working with Custom/Generic Events and definitely none for working with "Invoke a java portlet method"
Found out by decompiling the code that you can do the following:
add methodName(HttpServletRequest, HttpServletResponse, Event) to you backing file, or
add methodName(ActionRequest, ActionResponse, Event) to your java portlet
In both cases, I need find the jar file containing the "Event" interface. Have found most of the other classes in netuix_servlet.jar
Would also appreciate any further info on when the above methods actually get called with respect to the "processAction" and "processRender" methods for jsr168 portlets...Found the answer after a pretty manual search - its located inside:
BEA_HOME/weblogic81/portal/lib/netuix/system/netuix_system.jar
All other interfaces being inside the WEB-INF/lib/netuix_servlet.jar, this one class from this package has been packed into a jar at the system classpath level!!
Had to manually look at the classpath in startWeblogic.cmd and then open up every jar file, follow dependent jar files via the manifest.mf etc... -
Inter Portlet communication without using workshop
Hi
Does any one have any luck trying to do inter portlet communication without using weblogic workshop IDE?Hi Curt,
WLP's eventing system is designed such that portlet's don't have to care
whether the source/destination is local or remote. If you have a portlet
that fires/consumes events, when you create a proxy portlet on a
consumer, the portlet on the producer will be able to fire and receive
events without any changes to it. In this scenario, the proxy portlets
work with the WLP's event runtime to collect and dispatch events on
behalf of portlets on the producer. Going forward, WSRP 2.0 and
JSR168-next's eventing models will be mapped to the same WLP event runtime.
Subbu
Curt Smith wrote:
Thanks Subbu for your enlightenment here and in this group!!
You mentioned my next quest, WSRP'ifying my portlet & IPC system.
Can you suggest an WSRP example anywhere on the net or in bea?
I guessing that suitability of IPC is also a function of whether the portlets are the remote portlets or the local portlets.
Might a non-Bea IPC choice be usable within the local portlets, which are WSRP clients to stand alone remote portlets?
I can imagine now that you mention it that the remote WRSP producer portlets can't use just any IPC facility and the events be pushed inband to the consumer portal...
tnx curt -
Inter portlet communication using a float portlet
Hi,
I am trying to achieve inter portlet communication between a jsp portlet and a pageflow portlet.
The jsp portlet will open up as a pop up window or as a float portlet.
I am using BEA Weblogic 8.1 SP5.
Has any body tried this IPC when the jsp portlet is a float portlet?
If there is any documentation available for the same?
Thanks,
ShreeshHi,
Thanks for the reply.
In the search.jsp I am adding an action associated with a form bean, and passing the search string to the form, which will pass the request to the action method. This is the code snippet:
* @jpf:action
* @jpf:forward name="success" path="search.jsp"
protected Forward searchcriteria(SearchcriteriaForm form)
String searchString = form.getString();
try {
URL url = new URL("http://localhost/demo_search.asp");
HttpURLConnection http = (HttpURLConnection) url.openConnection();
http.setRequestMethod("POST");
PrintStream out=new PrintStream(http.getOutputStream());
out.println("searchParam=searchstring");
out.flush();
out.close();
BufferedReader reader=new BufferedReader(new InputStreamReader(http.getInputStream()));
reader.readLine();
String patternStr = "pattern";
Pattern pattern = Pattern.compile(patternStr);
Matcher matcher = pattern.matcher("<a href");
// Retrieve all lines that match pattern
String line = null;
while ((line = reader.readLine()) != null)
out.println("***"+line+"***");
matcher.reset(line);
if (matcher.find()) {
// line matches the pattern
} catch(Exception e)
e.printStackTrace();
return new Forward("success");
* FormData get and set methods may be overwritten by the Form Bean editor.
public static class SearchcriteriaForm extends FormData
private String string;
public void setString(String string)
this.string = string;
public String getString()
return this.string;
The question is what should be the return forward for the search coz, the result should be displayed in a seperate portlet. Also, how do I capture only the result in the result.jsp.
I would appreciate if you help me,
Thanks in Advance,
Sailatha -
Struts Portlet - inter Portlet communication
Hi
How to make inter Portlet communication in Struts portlets?
Thanks
SubinA quick google search brought back this:
http://download.oracle.com/docs/cd/B15904_01/portal.1012/b14134/pdg_java.htm -
How to perform inter-portlet communication in alui6.1.
I want to perform perform inter-portlet communication in alui6.1. I don't have any clue to how to do it.
Can anyone help me.Frankly, I did it using jQuery. When you have just two portlests on page, you can hardcode object id of second portlet in a code (not so nice, but very fast to see results). Otherwise you can use portlet settings to stay more environment independent.
In brief, in first portlet via ajax I request for data, using css selector jQuery, paste content to div in second portlet.
Maybe you are looking for
-
In any array, you get the length of it by calling "MyArray.length". length is a public variable, but it cannot be set. If you try: String[] str = { "ss" }; str.length = 2; you'll get an error saying you can't change a final variable. So my question i
-
I forgot my password to my iPod what do I do?
I have no clue what to do
-
InDesign crashes whenever I try to edit an InCopy article
I just exported all stories within the document to InCopy. Now when I try to edit any story within InDesign, it crashes. I've tried updating the content to make sure the link is working, but it still crashes if I try to check the article out to edit
-
Hi, Just want to create a class that provides a unique IP address to the client from the pool of available IP address. the client will then maintain possession of this IP address until a time when the workstation is ready to return the IP address to
-
Hi II upload a flat file with datas like "Order No" whitch is stored as De/12/Ce/1435, and "Date" stored as 1999-02-12. But when I look a preview I see "Order No" converted to number something like 000000001000000234 and "Date" is cut to only 1999-02