Sunday, November 23, 2008

Dual Monitor With Ubuntu

lspci to get the graphics card info (or look it up in /etc/X11/xorg.conf)

There were instructions at:
http://intellinuxgraphics.org/dualhead.html


I had to modify xorg.conf in /etc/X11 so that screen has virtual size big enough to hold both your screen resolutions (for me 2560 x 2048)

then I ran

xrandr --ouput VGA --right-of LVDS

Tuesday, November 18, 2008

GWT - How to change implementation based on properties

In module file:

<define-property name="entryPoint" values="snp,RunManagement,JobTracking">

<replace-with class="au.com.interdev.snp.client.runmgmt.RunManagementUI">
<when-type-is class="au.com.interdev.snp.client.SNPUI">
<when-property-is name="entryPoint" value="RunManagement">
</when-property-is>
</when-type-is></replace-with>
</define-property>

In html file:

<meta name="gwt:property" content="entryPoint=RunManagement">


You can also set the property via some javascript in the module file - see the module file fo i18n

Sunday, November 9, 2008

Web.xml security

http://forums.sun.com/thread.jspa?threadID=5233721

Tuesday, October 7, 2008

Whether to Make Exceptions unchecked

Typically we throw all these BlaUnknown exceptions when creating things.

Like when creating a Device, you need a DeviceType to exist. So the createDevice() method throws a DeviceTypeUnknown exception.

These make method calls very clunky because you have to catch all of these exceptions.

I thought of making them unchecked because you expect these things to exist when you are creating a device, and if they don't, its an internal runtime error.

Shafiek pointed out two reasons against this:
if it does happen, it's could be the result of another user deleting something - in which case this should be conveyed to the current user.

WebServices Need to know what exceptions will be thrwon.

Monday, September 22, 2008

Jars required for jboss ejb client

set CLASSPATH=%CLASSPATH%;%JBOSS_CLIENT_DIR%\jboss-aop-jdk50-client.jar
set CLASSPATH=%CLASSPATH%;%JBOSS_CLIENT_DIR%\jboss-aspect-jdk50-client.jar
set CLASSPATH=%CLASSPATH%;%JBOSS_CLIENT_DIR%\jboss-ejb3-client.jar
set CLASSPATH=%CLASSPATH%;%JBOSS_CLIENT_DIR%\jboss-ejb3x.jar
set CLASSPATH=%CLASSPATH%;%JBOSS_CLIENT_DIR%\jbossall-client.ja



Jars required for jaxws ws client

set CLASSPATH=%CLASSPATH%;.\jaxws\FastInfoset.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\activation.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\http.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jaxb-api.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jaxb-impl.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jaxb-xjc.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jaxws-api.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jaxws-rt.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jaxws-tools.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jsr173_api.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jsr181-api.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\jsr250-api.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\resolver.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\saaj-api.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\saaj-impl.jar
set CLASSPATH=%CLASSPATH%;.\jaxws\sjsxp.jar


set CLASSPATH=%CLASSPATH%;%JBOSS_DIR%\lib\endorsed\xercesImpl.jar
Adding basic authentication to ws client

JAXWS

TriprequestService service = new TriprequestService();
Triprequest port = service.getTriprequestPort();
BindingProvider bp = (BindingProvider) port;
Map map = bp.getRequestContext();
map.put(BindingProvider.USERNAME_PROPERTY, "shafiek1");
map.put(BindingProvider.PASSWORD_PROPERTY, "password");
map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://qapo:8888/trex-pn/triprequest");


JAXRPC

stub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,
username);
stub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,
password);

Wednesday, June 18, 2008

wireless security

If wireless is encrypted, does this mean people on the same network as me cannot read the contents of my packets? ie. If I logon to a site that uses basic http security, over an encrypted wireless connection, can other ppl easily see my username and password?

I think that when your wireless connection is encrypted, you have your own encrypted channel. Ie. others logged on to same wireless network cannot read your packets over the air.