Search This Blog

Wednesday, April 18, 2012

How To MQ SSL

You Must READ this : WebSphere MQ SSL channels on Windows

MQ SSL

SSL configuration of the Websphere MQ Java/JMS client

How to Set MQ ssl details programmatically (c++)?
My C++ code looks like this ( the MQ header from v7/6 version):

ImqChannel * pchannel = new ImqChannel;
pchannel->setChannelName("SSL_CHANNEL");
pchannel->setTransportType(MQXPT_TCP);
pchannel->setConnectionName ("myhostname(1414)");
pchannel->setSslCipherSpecification("TRIPLE_DES_SHA_US"); // its must be the same as the channel 

ImqQueueManager mgr;
mgr.setName("myQMgr");
mgr.setChannelReference(pchannel);
mgr.setKeyRepository("c:\\keys\\key");

To complete this post , and if you interesting with How to MQ SSL with CCDT files follow this post.

Yaniv Tzanany

Tuesday, April 10, 2012

Android App Development – Linear and Relative Layouts

the next article made my day, very good explanation with samples regards Android layout ... and all the headache about this subject.
Android App Development – Layouts Part One: Linear and Relative Layouts | Mobile Orchard:

enjoy
Yaniv T

ASP.NET ListView with DetailsView - get the new item selected

i have a listview with datapager attach to it , and when you clikc on an item you can edit/insert/delete this item in the details view control.

my problem was , when i add new item , so its added to the end of my list , mean to the last page, so if i wanted to continue edit it or chnage it , i needed to goto last page select it and edit it... bad idea...

so here is my solution on this


        protected void DetailsView1_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
        {
// get the total items
            int total = DataPager1.TotalRowCount;
// calc the last page
            int pages = total / DataPager1.PageSize;
// set the pager to the last page
            DataPager1.SetPageProperties(pages * DataPager1.PageSize, DataPager1.PageSize, true);
// bind again my listview
            ListView1.DataBind();
// select the last one
            ListView1.SelectedIndex = ListView1.Items.Count - 1;
/// boooom your new item show again in your detals view

        }

enjoy
Yaniv Tzanany