Saturday, September 10, 2011

WebSphere 8 on Windows as Standard User

While I doubt this is supported usage, I had a goal of using MyEclipse Bling (MyEclipse Blue combined with MyEclipse for Spring), along with IBM WebSphere Application Server v8 on Windows 7 as a standard user.

Here's what I did:
  • Install WebSphere 8 and MyEclipse Bling

  • Grant users full control of the AppServer directory

  • Create a WebSphere profile however you prefer

  • Open the command prompt as an admin to create a service for the profile

  • 'cd' to your WAS home bin (e.x. cd C:\IBM\WebSphere\AppServer\bin)

  • WASService.exe -add AppSrv01 -serverName server1 -profilePath C:\IBM\WebSphere\AppServer\profiles\AppSrv01 -startType manual (replace AppSrv01 and the profile path with yours of course)

  • Download SetACL

  • Open Services, right click your WAS service and click properties. In Path to executable copy the actual name of the service (e.x. "IBMWAS80Service - AppSrv01")

  • In the command prompt: SetACL.exe -on "IBMWAS80Service - AppSrv01" -ot srv -actn ace -ace "n:S-1-1-0;p:full;s:y;i:np;m:grant;w:dacl"


The n: part you define the SID of the user you want to grant access. S-1-1-0 is the SID for everyone.

At this point, WAS starts just fine when a standard user starts it via services management, however by using WASService -start (which MyEclipse Blue uses) it still does not work. Update soon when I figure it out.

Saturday, June 11, 2011

Compiling g++ for C++0x on CentOS

CentOS 5 (I don't recall the minor version I am using) includes g++ 4.1, however you cannot do C++0x development without g++ 4.4 or higher. Here's what I did:

Dependencies



First download the dependencies gmp-5.0.2, mpfr-3.0.1, mpc-0.9, ppl-0.11.2, cloog-ppl-0.15.11 (see http://gcc.gnu.org/install/prerequisites.html)

gmp


./configure --enable-cxx
make
make check
sudo make install


mpfr


./configure --with-gmp=/usr/local
make
make check
sudo make install


mpc


./configure --with-gmp=/usr/local
make
make check
sudo make install


ppl


./configure --with-gmp=/usr/local
make
make check
sudo make install

Grab some coffe, food, go for a stroll, etc. during make, this one takes a while (or at least it does in a VM)

cloog-ppl


./configure --with-gmp=/usr/local --with-ppl=/usr/local
make
make check
sudo make install


gcc



Download gcc (I used gcc-4.5.3), gcc-core, and g++

Then from the PARENT directory of where you extracted gcc:
mkdir gccbuild
cd gccbuild
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
../gcc-4.5.3/configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-ppl=/usr/local --with-cloog=/usr/local
make -j 2
# go to sleep
make check
make install

Monday, June 6, 2011

Local WebSphere Message Broker Maintenance on Windows Domain

As a follow-up to http://craigstjean.blogspot.com/2011/03/local-websphere-message-broker-install.html, here are some maintenance tips:

After changing your domain password:
  1. Change your local Windows user password to be the same
  2. Open the ODBC Control Panel and update your user in the System DSN
  3. Open the Broker Command Console and type:
    mqsichangebroker -i -a -p

Saturday, March 12, 2011

Getting Started with WebSphere MQ 7 Broker 7 on Linux

I was interested in evaluating what it was like working with MQ7 and Broker 7, so I setup a Linux VM (CentOS 5, x64). My goal was to run MQ, Broker, and the Toolkit all locally.

Note: Not all of this is perfect or maybe even ideal, its just what I did. CentOS is not a supported distribution for these products. I know more about MQ6 and Broker 6.1 than 7.

Before I Started


  • Installed DB2 Express
  • yum install compat-libstdc++-33 (MQ needs this)


Installing MQ7


  • Download MQ7 Trial and extract it

  • ./mqlicense.sh -accept (after reading it of course)

  • rpm -ivh MQSeriesRuntime-7.0.1-3.x86_64.rpm MQSeriesServer-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesClient-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesSDK-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesJava-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesEclipseSDK33-7.0.1-3.x86_64.rpm

  • Update /opt/mqm/eclipseSDK33/eclipse/eclipse.ini add -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/firefox-3.6

  • rpm -ivh MQSeriesConfig-7.0.1-3.x86_64.rpm

  • usermod -a -G mqm craig (replace craig with your username)

  • usermod -a -G mqm root

  • usermod -a -G mqm mqm (for some reason the mqm user didn't have the group)



Installing Message Broker


  • Download and extract the WMB Trial

  • groupadd mqbrkrs

  • usermod -a -G mqbrkrs craig

  • usermod -a -G mqbrkrs root

  • ./setuplinuxx64 -console

  • Mostly just enter 1s or 0s until complete



Installing WMB Toolkit


  • Download and extract the WMB Toolkit Trial

  • In the IBMInstallationManager directory...

  • ./install -nosplash --launcher.suppressErrors -input mbtoolkit-silent.xml -silent


Create Broker


  • Since I'm going to do things the easy way instead of the right way (I'm doing everything as root instead of running under mqm), need to reboot here

  • . /opt/ibm/mqsi/7.0/bin/mqsiprofile (notice the ". " at start)

  • cd /opt/mqm/bin

  • ./crtmqm -u DLQ ESBBKL

  • ./strmqm ESBBKL

  • ./runmqlsr -m ESBBKL -t TCP &

  • mqsicreatebroker ESBBKLBKR -i craig -a <password> -q ESBBKL

  • mqsichangebroker ESBBKLBKR -i craig -a <password> -P 1414

  • mqsistart ESBBKLBKR

  • mqsichangeproperties ESBBKLBKR -b httplistener -o HTTPListener -n startListener -v true

  • mqsistop ESBBKLBKR

  • mqsistart ESBBKLBKR

  • mqsicreateexecutiongroup ESBBKLBKR -e default



Working in the Toolkit


  • In the Brokers view, connect to remote queue ESBBKL at localhost.localdomain port 1414

I know that ideally I could right click Brokers and create a new local broker instead of doing a lot of the above, but obviously something up there threw it off. Furthermore, you can't use localhost because it tells you to use a local broker.

NOTE: When I went through and did this again to verify I didn't miss any steps, the toolkit already had my local broker in it. You probably won't need to add it, however if it is not in the list, do the above.

Create Local Queues


  • Create file with the following contents

DEFINE QLOCAL ('REQ.MB.TEST_FLOW') +
REPLACE

DEFINE QLOCAL ('RESP.MB.TEST_FLOW') +
REPLACE

DEFINE QLOCAL ('DLQ') +
REPLACE


  • runmqsc ESBBKL < queuedefs.conf


Create flows, more queues, have fun!

Tuesday, March 8, 2011

Local WebSphere Message Broker Install on Windows Domain

After having a lot of difficulty setting up a local WMQ and WMB install on my domain account, here is what I did:

  • Install MQ and its fixpacks

  • Install WMB runtime and its fixpacks

  • Install the Broker Toolkit

  • Created a local Windows user with the same username/password as my domain user

  • Add user to mqbrkrs and mqm groups

  • Install latest DB2 Express

  • Start the broker command console


MQSI 6.1.0.5
C:\IBM\MQSI\6.1
Start broker Command Console

C:\IBM\MQSI\6.1>cd c:\IBM\WMQ\bin

c:\IBM\WMQ\bin>crtmqm.exe -u DLQ ESBBKL
WebSphere MQ queue manager created.
Creating or replacing default objects for ESBBKL.
Default objects statistics : 43 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.

c:\IBM\WMQ\bin>strmqm ESBBKL
WebSphere MQ queue manager 'ESBBKL' starting.
5 log records accessed on queue manager 'ESBBKL' during the log replay phase.
Log replay for queue manager 'ESBBKL' complete.
Transaction manager state recovered for queue manager 'ESBBKL'.
WebSphere MQ queue manager 'ESBBKL' started.

c:\IBM\WMQ\bin>call mqsicreatedb ESBBKLDB -e DB2
BIP9809I: Creating DB2 Database 'ESBBKLDB', this may take a while.
BIP9825I: Creating the ODBC Data Source name 'ESBBKLDB'.
BIP9817I: The DB2 database engine was used to create the 'ESBBKLDB' database.

BIP8071I: Successful command completion.

c:\IBM\WMQ\bin>call mqsicreateconfigmgr ESBBKL_CFGMGR -i <USERNAME> -a <PASSWORD> -q ESBBKL
AMQ8110: WebSphere MQ queue manager already exists.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
BIP8071I: Successful command completion.

c:\IBM\WMQ\bin>call mqsicreatebroker ESBBKLBKR -i <USERNAME> -a <PASSWORD> -q ESBBKL -n ESBBKLDB
AMQ8110: WebSphere MQ queue manager already exis
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
The setmqaut command completed successfully.
BIP8071I: Successful command completion.

c:\IBM\WMQ\bin>call mqsistart ESBBKL_CFGMGR
BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem.

c:\IBM\WMQ\bin>call mqsistart ESBBKLBKR
BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem.


  • Open MQ Explorer

  • Create new queue named DLQ in ESBBKL

  • Create new TCP Listener (I used port 1414, the default)

  • In the toolkit, add new Domain Connection to ESBBKL port 1414 on localhost

  • Connect to the new Domain

  • Add new broker reference to the topology, ESBBKLBKR on ESBBKL

  • Enjoy!



Note: if you want to delete and start over, do NOT delete the database first. If you do, call mqsicreatedb again, then use mqsichangebroker and set your username and password again.

The steps I follow to delete are:
  • Start broker command console and cd c:\IBM\WMQ\bin

  • call mqsistop ESBBKLBKR

  • call mqsideletebroker ESBBKLBKR

  • call mqsistop ESBBKL_CFGMGR

  • call mqsideleteconfigmgr -w -q ESBBKL_CFGMGR

  • call mqsideletedb -d DeleteAllDatabases