<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Days of ... (websphere)</title><link>http://blog.yellowbluebus.com</link><description>Useful technology stuff</description><lastBuildDate>Wed, 03 Jul 2013 12:03:00 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Open beta of Rational Software Architect soon</title><link>http://blog.yellowbluebus.com/posts/wordpress20060928open-beta-of-rational-software-architect-soon.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;IBM Rational development organizations host a number of early betas to gain the expert contribution and insight from our customers and from those evaluating IBM Rational products. New open betas for IBM Rational Software Architect V7.0 and Rational Functional Tester V7.0 are scheduled to be available soon. Preregister now and we'll inform you via e-mail when the code is ready for download.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www-306.ibm.com/software/rational/beta/v7/"&gt;Here is the page&lt;/a&gt; with the overview and information on how to register.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://blog.yellowbluebus.com/posts/wordpress20060928open-beta-of-rational-software-architect-soon.html</guid><pubDate>Thu, 28 Sep 2006 08:41:32 GMT</pubDate></item><item><title>Websphere security: five tips for first time WAS hardeners</title><link>http://blog.yellowbluebus.com/posts/wordpress20060727websphere-security-five-tips-for-first-time-was-hardeners.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Spent some time trying to enable Websphere security on my machine. Here are some tips:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Before trying to secure your WAS create the additional profile and use it to train yourself. Creation of the profile takes five minutes and you could delete it after you finished.
&lt;blockquote&gt;Use %was_install_dir%/bin/ProfileCreator/pctWindows.exe or use command line tool from %was_install_dir%/profiles/default/bin/wasprofile.bat&lt;/blockquote&gt;&lt;/li&gt;
    &lt;li&gt;Before you going to mess up this profile, make a copy %profile_dir%/config/cells/%cell_name%/security.xml&lt;blockquote&gt;If you mess up the security and server won't start at all - just replace security.xml with saved copy. Chances are that server will start after that and you don't have to re-create profile.&lt;/blockquote&gt;&lt;/li&gt;
    &lt;li&gt;If you made some mistake and profile won't start anymore - just delete profile using wasprofile -delete -profileName %your_profile_name%&lt;blockquote&gt;Sometimes this command won't remove the profile. In this case go to %was_install_dir%/properties and remove line with your profile from profileRegistry.xml. Then you can just simply delete the profile folder.&lt;/blockquote&gt;&lt;/li&gt;
    &lt;li&gt;After you enabled security you may see the exceptions in the SystemOut.log: (SECJ0305I, ADMN0007I) saying something about UNAUTHORIZED user can not be authorized. To resolve this simply add group, named EVERYONE to the Monitor role&lt;blockquote&gt;Admin Console - System Administration - Console settings - Console Groups - Add - Select from special subject&lt;/blockquote&gt;&lt;/li&gt;
&lt;!--adsense#links--&gt;
    &lt;li&gt;If you securing Websphere, supplied with Rational Software Development Platform, you will have problems starting server and/or deploying applications to it. Editing of the server profile will not always help. The best way is to create the Server project in J2EE perspective and then create the server in that project.&lt;blockquote&gt;Don't forget to use Security options in the server profile and use SOAP for server communications as RMI not always work.&lt;/blockquote&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://blog.yellowbluebus.com/posts/wordpress20060727websphere-security-five-tips-for-first-time-was-hardeners.html</guid><pubDate>Thu, 27 Jul 2006 17:59:17 GMT</pubDate></item><item><title>Creating WebSphere 6 application MBeans</title><link>http://blog.yellowbluebus.com/posts/wordpress20060120creating-websphere-6-application-mbeans.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This is a little step by step guide on how to create and register custom service with JMX interface on WebSphere:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create class, which implements two interfaces:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[java]&lt;/p&gt;
&lt;p&gt;com.ibm.websphere.runtime.CustomService&lt;/p&gt;
&lt;p&gt;com.ibm.websphere.management.JMXManageable&lt;/p&gt;
&lt;p&gt;[/java]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Implement "initialize" method (inherited from CustomService)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This method has a parameter, Properties, which will contain properties defined via WS Administration console. We are interested in one property: externalConfigURLKey. This property contains path to external configuration file (if any is needed).&lt;/p&gt;
&lt;p&gt;This is how to get the path:&lt;/p&gt;
&lt;p&gt;[java]&lt;/p&gt;
&lt;p&gt;public void initialize(Properties configProperties) throws Exception {
 readConfig(configProperties.getProperty(externalConfigURLKey));
}&lt;/p&gt;
&lt;p&gt;[/java]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;shutdown() method may be left blank.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;implement getType() method (inherited from JMXManageable):&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[java]&lt;/p&gt;
&lt;p&gt;public String getType() {
 return "MyMBean";
}&lt;/p&gt;
&lt;p&gt;[/java]&lt;/p&gt;
&lt;p&gt;Remember the name you returned here!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;implement getMBeanProperties:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[java]&lt;/p&gt;
&lt;p&gt;public Properties getMBeanProperties() {
 Properties props = new Properties();
 props.put("SpecialProperty", "value");
 return props;
}&lt;/p&gt;
&lt;p&gt;[/java]&lt;/p&gt;
&lt;p&gt;I think this will return a list of properties, not declared in MBean descriptor. Read only, of course, since there is no setMBeanProperties() method.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;implement getters and setters for properties you want to expose:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[java]&lt;/p&gt;
&lt;p&gt;public String getUserName() {
 return this.userName;
}&lt;/p&gt;
&lt;p&gt;public void setUserName(String param) {
 this.userName = param;
}&lt;/p&gt;
&lt;p&gt;[/java]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create MBean descriptor file, for example myTest.xml.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[xml]&lt;/p&gt;
&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;mbean type="MyMBean"&gt;&lt;attribute name="UserName" type="java.lang.String" getmethod="getUserName" setmethod="setUserName"&gt;&lt;/attribute&gt;&lt;/mbean&gt;

&lt;p&gt;[/xml]&lt;/p&gt;
&lt;p&gt;IMPORTANT: Make sure that type matches the value you remembered on the step 4!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Compile and package. Create .jar, having descriptor in the root. Place .jar somewhere accesible for WebSphere.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start WebSphere and open Administration console.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to Servers - Application Servers - yourserver - Server Infrastructure - Administration - Administration Services&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on "Extension MBean providers"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on "New"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the "Classpath" entry type the full path and name of your jar (created on step 8)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type something memorable in two other fields and click Apply.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on "Extension MBeans" (on the left)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on "New"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the name of MBean descriptor file (see step 7.)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;for example:&lt;/p&gt;
&lt;p&gt;myTest.xml&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Enter the type name of your MBean. IMPORTANT: must be the same name as it was on steps 4 and 7.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click Apply.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to Servers - Application Servers - yourserver - Server Infrastructure - Administration - Custom Services&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click New&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Place check on "Enable service at server startup".&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter full class name (with package) of your MBean class (the one we created on step 1) into "Classname" field.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter something memorable in "Display Name"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter fill path and file name of the jar file (step 8) into "Classpath".&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your service requires configuration file (step 2) enter full path to it into " External Configuration URL"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on Apply.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on Save (on top)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click Save.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the server.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here are the commands, used to verify MBean from admin console:&lt;/p&gt;
&lt;p&gt;To run console:&lt;/p&gt;
&lt;p&gt;wsadmin.bat -conntype SOAP -port 8881&lt;/p&gt;
&lt;p&gt;To make sure that MBean started:&lt;/p&gt;
&lt;p&gt;$AdminControl queryNames &lt;em&gt;:&lt;/em&gt;,type=&amp;gt;&lt;/p&gt;
&lt;p&gt;Store MBean in Tcl variable:&lt;/p&gt;
&lt;p&gt;set mybean [$AdminControl queryNames &lt;em&gt;:&lt;/em&gt;,type=MBeanName]&lt;/p&gt;
&lt;p&gt;See MBean description:&lt;/p&gt;
&lt;p&gt;$Help all $mybean&lt;/p&gt;
&lt;p&gt;See MBean attributes and values:&lt;/p&gt;
&lt;p&gt;$AdminControl getAttributes $mybean&lt;/p&gt;
&lt;p&gt;Set specific attribute:&lt;/p&gt;
&lt;p&gt;$AdminControl setAttribute $mybean UserName mike&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://blog.yellowbluebus.com/posts/wordpress20060120creating-websphere-6-application-mbeans.html</guid><pubDate>Fri, 20 Jan 2006 00:01:00 GMT</pubDate></item></channel></rss>