<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>itech9</title>
	<atom:link href="http://itech9.com/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://itech9.com/wp</link>
	<description>Notes, resources, information about software development, info security, other tech.</description>
	<pubDate>Thu, 26 Aug 2010 16:31:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>How to clear linux memory cache ..</title>
		<link>http://itech9.com/wp/?p=141</link>
		<comments>http://itech9.com/wp/?p=141#comments</comments>
		<pubDate>Thu, 26 Aug 2010 16:31:26 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=141</guid>
		<description><![CDATA[From http://www.scottklarr.com/topic/134/linux-how-to-clear-the-cache-from-memory/

$ sync; echo 3 > /proc/sys/vm/drop_caches

Wait for caches to be flushed..

$ sync; echo 0 > /proc/sys/vm/drop_caches

]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.scottklarr.com/topic/134/linux-how-to-clear-the-cache-from-memory/" target="_blank" title="caches">http://www.scottklarr.com/topic/134/linux-how-to-clear-the-cache-from-memory/</a></p>
<pre>
$ sync; echo 3 > /proc/sys/vm/drop_caches
</pre>
<p>Wait for caches to be flushed..</p>
<pre>
$ sync; echo 0 > /proc/sys/vm/drop_caches
</pre>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=141</wfw:commentRss>
		</item>
		<item>
		<title>Counting characters in perl..</title>
		<link>http://itech9.com/wp/?p=140</link>
		<comments>http://itech9.com/wp/?p=140#comments</comments>
		<pubDate>Fri, 13 Aug 2010 07:24:33 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=140</guid>
		<description><![CDATA[From http://www.perlmonks.org/?node_id=63955
How many &#8216;a&#8217; characters are in the string?

#!/usr/bin/perl

my $str = 'abcatpdmeuziapmb';
my $cnt = @{[$str =~ /(a)/g]};
print &#8220;$cnt\n&#8221;;

]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.perlmonks.org/?node_id=63955">http://www.perlmonks.org/?node_id=63955</a></p>
<p>How many &#8216;a&#8217; characters are in the string?</p>
<pre>
#!/usr/bin/perl

my $str = 'abcatpdmeuziapmb';
my $cnt = @{[$str =~ /(a)/g]};
print &#8220;$cnt\n&#8221;;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=140</wfw:commentRss>
		</item>
		<item>
		<title>Creating a wlfullclient.jar for JDK 1.6 client applications..</title>
		<link>http://itech9.com/wp/?p=139</link>
		<comments>http://itech9.com/wp/?p=139#comments</comments>
		<pubDate>Fri, 30 Jul 2010 18:39:02 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Weblogic]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=139</guid>
		<description><![CDATA[From http://download.oracle.com/docs/cd/E12840_01/wls/docs103/client/jarbuilder.html
Use the following steps to create a wlfullclient.jar file for a JDK 1.6 client application: 
1.Change directories to the server/lib directory.
cd WL_HOME/server/lib
2. Use the following command to create wlfullclient.jar in the server/lib directory:
java -jar wljarbuilder.jar
3.You can now copy and bundle the wlfullclient.jar with client applications. 
4.Add the wlfullclient.jar to the client application’s classpath.
]]></description>
			<content:encoded><![CDATA[<p>From http://download.oracle.com/docs/cd/E12840_01/wls/docs103/client/jarbuilder.html</p>
<p>Use the following steps to create a wlfullclient.jar file for a JDK 1.6 client application: </p>
<p>1.Change directories to the server/lib directory.</p>
<p>cd WL_HOME/server/lib</p>
<p>2. Use the following command to create wlfullclient.jar in the server/lib directory:</p>
<p>java -jar wljarbuilder.jar</p>
<p>3.You can now copy and bundle the wlfullclient.jar with client applications. </p>
<p>4.Add the wlfullclient.jar to the client application’s classpath.</p>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=139</wfw:commentRss>
		</item>
		<item>
		<title>List contents of an rpm ..</title>
		<link>http://itech9.com/wp/?p=138</link>
		<comments>http://itech9.com/wp/?p=138#comments</comments>
		<pubDate>Fri, 30 Jul 2010 18:23:51 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Fedora]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[RedHat_EL]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=138</guid>
		<description><![CDATA[From http://www.tech-recipes.com/rx/1419/list-files-in-an-rpm-package/
To list the contents of the RPM techrx.rpm use this command:
rpm -qlp techrx.rpm
]]></description>
			<content:encoded><![CDATA[<p>From http://www.tech-recipes.com/rx/1419/list-files-in-an-rpm-package/</p>
<p>To list the contents of the RPM techrx.rpm use this command:</p>
<p>rpm -qlp techrx.rpm</p>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=138</wfw:commentRss>
		</item>
		<item>
		<title>Database model ACID rules..</title>
		<link>http://itech9.com/wp/?p=137</link>
		<comments>http://itech9.com/wp/?p=137#comments</comments>
		<pubDate>Thu, 01 Jul 2010 00:08:33 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=137</guid>
		<description><![CDATA[From http://databases.about.com/od/specificproducts/a/acid.htm

Atomicity states that database modifications must follow an &#8216;all or nothing&#8217; rule.


Consistency states that only valid data will be written to the database.


Isolation requires that multiple transactions occurring at the same time not impact each other&#8217;s execution.


Durability ensures that any transaction committed to the database will not be lost.



]]></description>
			<content:encoded><![CDATA[<p>From <a href='http://databases.about.com/od/specificproducts/a/acid.htm' target='_blank' title='ACID rules'>http://databases.about.com/od/specificproducts/a/acid.htm</a></p>
<ul>
<li><b>Atomicity</b> states that database modifications must follow an &#8216;all or nothing&#8217; rule.
</li>
<p></b></p>
<li><b>Consistency</b> states that only valid data will be written to the database.
</li>
<p></b></p>
<li><b>Isolation</b> requires that multiple transactions occurring at the same time not impact each other&#8217;s execution.
</li>
<p></b></p>
<li><b>Durability</b> ensures that any transaction committed to the database will not be lost.
</li>
<p></b></p>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=137</wfw:commentRss>
		</item>
		<item>
		<title>WebLogic 10.3 Workshop notes..</title>
		<link>http://itech9.com/wp/?p=136</link>
		<comments>http://itech9.com/wp/?p=136#comments</comments>
		<pubDate>Thu, 24 Jun 2010 18:43:33 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Server]]></category>

		<category><![CDATA[Weblogic]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=136</guid>
		<description><![CDATA[>> WebLogic 10.3 is old but I want to follow the workshop and I cannot
find the &#8220;workshop&#8221; in the Oracle WebLogic 10.3.3 package.
&#160;&#160;* For page navigation, it uses Apache Beehive, which is now retired.
>> Add Eclipse components via:
&#160;&#160;* /opt/bea/wlserver_10.3/common/bin/config.sh &#038;
&#160;&#160;* Fix eclipse java crash: add this line to &#8220;workshop.ini&#8221;:
&#160;&#160;-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9/xulrunner
&#160;&#160;* Create application domains outside the server [...]]]></description>
			<content:encoded><![CDATA[<p>>> <b>WebLogic 10.3</b> is old but I want to follow the workshop and I cannot<br />
find the &#8220;workshop&#8221; in the Oracle WebLogic 10.3.3 package.</p>
<p>&nbsp;&nbsp;* For page navigation, it uses Apache Beehive, which is now retired.</p>
<p>>> <b>Add Eclipse components</b> via:</p>
<p>&nbsp;&nbsp;* /opt/bea/wlserver_10.3/common/bin/config.sh &#038;</p>
<p>&nbsp;&nbsp;* Fix eclipse java crash: add this line to &#8220;workshop.ini&#8221;:</p>
<p>&nbsp;&nbsp;-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9/xulrunner</p>
<p>&nbsp;&nbsp;* Create application domains outside the server directory space</p>
<p>>> <b>Fix jre error</b>: &#8220;JRE is selected, but the path is invalid&#8221;.</p>
<p>&nbsp;&nbsp;* Set path (JAVA_HOME, WLS_JAVA_HOME, etc..) in .project.properties</p>
<p>>> <b>Web Application with Beehive</b> (now retired) page navigation control</p>
<p>&nbsp;&nbsp;>> See wlswswa*.png images.</p>
<p>&nbsp;&nbsp;>> Main points/tools:</p>
<p>&nbsp;&nbsp;* Page Flow editor and overview panels</p>
<p>&nbsp;&nbsp;* Controller methods annotated for &#8220;page flow&#8221; processing.</p>
<p>>> <b>Web Services</b></p>
<p>  * Simple Web Service </p>
<p>    - add src/services folder</p>
<p>    - Add &#8220;SomeService.java&#8221; class to &#8220;src/services&#8221; folder.</p>
<p>    - SomeService.java will be annotated with @WebService class annotation</p>
<p>    - Web methods will be annotated with @WebMethod annot.</p>
<p>  * To Test, right click on (the &#8217;services&#8217; trigger &#8216;Run As&#8217;) SomeService.java and do &#8216;Run As&#8217; with &#8216;Run On Server&#8217; selection.</p>
<p>    - The web service test page is displayed with URL:</p>
<p>    http://host:7001/wls_utc/WebServiceProjectName/WebServiceName?WSDL</p>
<p>    - The web service test client page:</p>
<p>    http://host:7001/wls_utc/</p>
<p>>> <b>To enable or disable the domain configuration locking</b> feature in a development domain:</p>
<p>   In browser, http://host:7001/console, log in as admin..</p>
<p>   1. In the banner toolbar region at the top of the right pane of the Console, click Preferences.<br />
   2. Click User Preferences.<br />
   3. Select or clear <b>Automatically Acquire Lock and Activate Changes</b> to enable or disable the feature.<br />
   4. Click Save.</p>
<p>>> <b>Entity EJBs (VisitBean) - Persistence with CMP (Container Managed Persistence)</b></p>
<p>  - Create EJB project, Create package (under ejbModule), right-click on package, select &#8220;New Weblogic Entity Bean&#8221;.</p>
<p>  - Screen shots are in wlswsejb[0-9]*_*.png</p>
<p>  - Examine the generated code.  Open the &#8220;Properties&#8221; view from top Eclipse menu &#8220;Window / Show View / Properties&#8221;.  The &#8220;Properties&#8221; view should open in a window with a tab (bottom area).</p>
<p>  - Click on the &#8220;@Entity&#8221; annotation.  The allowed and the set attribute values for the annotation are shown in the &#8220;Properties&#8221; view (see wlswsejb3_properties_view.png).</p>
<p>  - Setup CMP fields and methods:</p>
<pre>
@CmpField(column = "visitorName", primkeyField = Constants.Bool.TRUE)
@LocalMethod()
public abstract java.lang.String getVisitorName();
</pre>
<p>Note: primkeyField indicates whether the field is a primary key.</p>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=136</wfw:commentRss>
		</item>
		<item>
		<title>Helpful WebLogic error messages..</title>
		<link>http://itech9.com/wp/?p=135</link>
		<comments>http://itech9.com/wp/?p=135#comments</comments>
		<pubDate>Tue, 15 Jun 2010 04:51:45 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Server]]></category>

		<category><![CDATA[Weblogic]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=135</guid>
		<description><![CDATA[In WebLogic 10.3 ..
weblogic-ejb-jar.xml with this entity-descriptor:

&#60;entity-descriptor&#62;

&#60;persistence&#62;
&#60;persistence-use&#62;
  &#60;type-identifier&#62;WebLogic-CMP&#60;/type-identifier&#62;
  &#60;type-version&#62;6.0&#60;/type-version&#62;
  ...
&#60;/persistence-use&#62;
&#60;/persistence&#62;

&#60;/entity-descriptor&#62;

Triggers this error (Note the -truly- useful help message):

Unable to deploy EJB: /opt/bea/user_projects/domains/base_domain/servers/AdminServer/stage
/_appsdir_ProductEjb_jar/ProductEjb.jar from ProductEjb.jar:

Persistence type 'WebLogic-CMP' with version '6.0' which is referenced in bean 'Product' is not
installed. The installed persistence types are:(WebLogic_CMP_RDBMS, 5.1.0),
(WebLogic_CMP_RDBMS, 7.0), (WebLogic_CMP_RDBMS, 6.0).

Change this:

  &#60;type-identifier&#62;WebLogic-CMP&#60;/type-identifier&#62;
  &#60;type-version&#62;6.0&#60;/type-version&#62;

to this:

 [...]]]></description>
			<content:encoded><![CDATA[<p>In WebLogic 10.3 ..</p>
<p>weblogic-ejb-jar.xml with this entity-descriptor:</p>
<pre>
&lt;entity-descriptor&gt;

&lt;persistence&gt;
&lt;persistence-use&gt;
  &lt;type-identifier&gt;WebLogic-CMP&lt;/type-identifier&gt;
  &lt;type-version&gt;6.0&lt;/type-version&gt;
  ...
&lt;/persistence-use&gt;
&lt;/persistence&gt;

&lt;/entity-descriptor&gt;
</pre>
<p>Triggers this error (Note the -truly- useful help message):</p>
<pre>
Unable to deploy EJB: /opt/bea/user_projects/domains/base_domain/servers/AdminServer/stage
/_appsdir_ProductEjb_jar/ProductEjb.jar from ProductEjb.jar:

Persistence type 'WebLogic-CMP' with version '6.0' which is referenced in bean 'Product' is not
installed. The installed persistence types are:(WebLogic_CMP_RDBMS, 5.1.0),
(WebLogic_CMP_RDBMS, 7.0), (WebLogic_CMP_RDBMS, 6.0).
</pre>
<p>Change this:</p>
<pre>
  &lt;type-identifier&gt;WebLogic-CMP&lt;/type-identifier&gt;
  &lt;type-version&gt;6.0&lt;/type-version&gt;
</pre>
<p>to this:</p>
<pre>
  &lt;type-identifier&gt;WebLogic_CMP_RDBMS&lt;/type-identifier&gt;
  &lt;type-version&gt;7.0&lt;/type-version&gt;
</pre>
<p>and the jar will deploy.</p>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=135</wfw:commentRss>
		</item>
		<item>
		<title>Types, bits of security vulnerabilities..</title>
		<link>http://itech9.com/wp/?p=134</link>
		<comments>http://itech9.com/wp/?p=134#comments</comments>
		<pubDate>Mon, 14 Jun 2010 22:15:57 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=134</guid>
		<description><![CDATA[From http://www.cert.org/
cross-site scripting (XSS) vulnerabilities
Cross-site request forgery (CSRF)
denial of service (resource consumption)
Directory traversal
Integer overflow
Integer signedness
Session fixation (hijack web sessions)
PHP remote file inclusion
SQL injection 
]]></description>
			<content:encoded><![CDATA[<p>From <a href='http://www.cert.org' title='CERT' target='_blank'>http://www.cert.org/</a></p>
<p>cross-site scripting (XSS) vulnerabilities<br />
Cross-site request forgery (CSRF)<br />
denial of service (resource consumption)<br />
Directory traversal<br />
Integer overflow<br />
Integer signedness<br />
Session fixation (hijack web sessions)<br />
PHP remote file inclusion<br />
SQL injection </p>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=134</wfw:commentRss>
		</item>
		<item>
		<title>JBoss vs WebLogic - JNDI issues..</title>
		<link>http://itech9.com/wp/?p=133</link>
		<comments>http://itech9.com/wp/?p=133#comments</comments>
		<pubDate>Sat, 12 Jun 2010 00:07:30 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[JBoss]]></category>

		<category><![CDATA[Weblogic]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=133</guid>
		<description><![CDATA[In JBoss, one can get a reference to the Remote bean directly:

try
{
    context = new InitialContext(jndiprops);
    BookTestBeanRemote beanRemote =
        (BookTestBeanRemote) context.lookup("BookTestBean/remote");
    beanRemote.test();
} catch (NamingException e) {
    ...
}

In WebLogic 10.3, I was not able to do the [...]]]></description>
			<content:encoded><![CDATA[<p>In JBoss, one can get a reference to the Remote bean directly:</p>
<pre>
try
{
    context = new InitialContext(jndiprops);
    BookTestBeanRemote beanRemote =
        (BookTestBeanRemote) context.lookup("BookTestBean/remote");
    beanRemote.test();
} catch (NamingException e) {
    ...
}
</pre>
<p>In WebLogic 10.3, I was not able to do the same thing.<br />
The exception said that WebLogic JNDI failed to find the bean.<br />
As some searches indicated, I should have used something like this for<br />
the lookup string: &#8220;BookTestBean#com.blah.BookTestBeanRemote&#8221; ..<br />
I tried all kinds of combinations but I was not able to make it work.</p>
<p>In JBoss, the &#8220;Home&#8221; interface is not required.  In WebLogic, it is required.<br />
 This may have something to do with different levels of implementation<br />
of the EJB spec but I would think JBoss 5 and WebLogic 10<br />
should be pretty close in compatibility.. maybe.. what do I know?</p>
<p>Based on this, the only way I was able to make WebLogic work, was via<br />
the &#8220;Home&#8221; interface:</p>
<pre>
Context context;
try
{
    context = new InitialContext(jndiprops);

    UserTransaction txn = (UserTransaction) context.lookup("javax.transaction.UserTransaction");
    if (txn != null) {
        String jndiLookupStr = "";
	// jndiLookupStr = "BookTestBean#de.laliluna.library.BookTestBeanRemote";
        jndiLookupStr = "BookTestBean";

        Object oref = context.lookup(jndiLookupStr);
        BookTestBeanHome homeRef = (BookTestBeanHome) PortableRemoteObject.narrow(oref,
           BookTestBeanHome.class);
        BookTestBeanRemote beanRef = homeRef.create();

        txn.begin();
        beanRef.test();
        txn.commit();
    } // txn != null
}
catch (Exception e) {
    e.printStackTrace();
}
</pre>
<p>This page says that remote reference retrieval is possible with WebLogic:</p>
<p>http://camelcase.blogspot.com/2009/04/how-to-call-remote-transactional.html</p>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=133</wfw:commentRss>
		</item>
		<item>
		<title>JBoss vs WebLogic notes - persistence..</title>
		<link>http://itech9.com/wp/?p=132</link>
		<comments>http://itech9.com/wp/?p=132#comments</comments>
		<pubDate>Fri, 11 Jun 2010 23:44:10 +0000</pubDate>
		<dc:creator>techfox9</dc:creator>
		
		<category><![CDATA[JBoss]]></category>

		<category><![CDATA[Weblogic]]></category>

		<guid isPermaLink="false">http://itech9.com/wp/?p=132</guid>
		<description><![CDATA[In JBoss, this works:

List someBooks = em.createQuery("FROM Book b WHERE b.author=:name")
    .setParameter("name", "Sebastian").getResultList();

In WebLogic, I had to specify SELECTs:

List someBooks = em.createQuery("SELECT b FROM Book b WHERE b.author=:name")
    .setParameter("name", "Sebastian").getResultList();

If I have time, I will dig further and see why they behave differently but I suspect
that JBoss CMP is [...]]]></description>
			<content:encoded><![CDATA[<p>In JBoss, this works:</p>
<pre>
List someBooks = em.createQuery("FROM Book b WHERE b.author=:name")
    .setParameter("name", "Sebastian").getResultList();
</pre>
<p>In WebLogic, I had to specify SELECTs:</p>
<pre>
List someBooks = em.createQuery("SELECT b FROM Book b WHERE b.author=:name")
    .setParameter("name", "Sebastian").getResultList();
</pre>
<p>If I have time, I will dig further and see why they behave differently but I suspect<br />
that JBoss CMP is used automatically while in WebLogic, OpenJPA is used which<br />
requires the &#8220;SELECT&#8221; syntax.</p>
<p>Good example on client transaction setup:</p>
<p>http://camelcase.blogspot.com/2009/04/how-to-call-remote-transactional.html</p>
]]></content:encoded>
			<wfw:commentRss>http://itech9.com/wp/?feed=rss2&amp;p=132</wfw:commentRss>
		</item>
	</channel>
</rss>
