- Make a backup copy of your current JBoss run.bat
- Open run.bat and find the lines that look like this:
1rem JPDA options. Uncomment and modify as appropriate to enable remote debugging.2rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS% - Uncomment the second line by deleting "rem", and save.
- Start Jboss. (It won’t do much until you connect a debugger to it.)
- In Eclipse, open your project, and on the toolbar click on the debugger bug arrow, then Open Debug Dialog. If you couldn't find it quickly, Go to Run, Debug Configurations , Select Java Remote Debugger and Click on New.
- Choose Remote Java Application, right-click, New… and update the port to the address in the line you uncommented (possibly 8787).
- Click Debug
- Set a breakpoint somewhere in your code or a library that has source attached
- Exercise your project (via a web service, for instance) and when it hits one of your breakpoints, it will break in Eclipse.
Tuesday, August 30, 2011
Remote Debugging Eclipse Indigo & JBOSS 5.4
Saturday, August 27, 2011
How to check file size of directories in UNIX
#check partition sizes df -h #check directory size du -s -h /var/log/ #check every directory and file sizes under a dir. du -s -h /var/log/* #check individual size size du -s -h /var/log/lastlog
Sunday, February 13, 2011
wget - GNU Wget Manual
Wget is non-interactive, meaning that it can work in the background, while the user is not logged on. This allows you to start a retrieval and disconnect from the system, letting Wget finish the work. By contrast, most of the Web browsers require constant user's presence, which can be a great hindrance when transferring a lot of data.
Wget can follow links in HTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is sometimes referred to as ``recursive downloading.'' While doing that, Wget respects the Robot Exclusion Standard (/robots.txt). Wget can be instructed to convert the links in downloaded HTML files to the local files for offline viewing.
Wget has been designed for robustness over slow or unstable network connections; if a download fails due to a network problem, it will keep retrying until the whole file has been retrieved. If the server supports regetting, it will instruct the server to continue the download from where it left off.
Tuesday, January 4, 2011
"connect by prior" in Oracle
SELECT employee_id, last_name, manager_id
FROM employees
CONNECT BY PRIOR employee_id = manager_id;
A condition that identifies the relationship between parent rows and child rows of the hierarchy.
Tuesday, November 9, 2010
Telnet in Windows 7
Refer this link and resolve this issue.
http://www.question-defense.com/2010/07/23/windows-7-telnet-is-not-recognized-as-an-internal-or-external-command
Tuesday, August 17, 2010
32 bit or 64 bit for web server
Thursday, July 29, 2010
Data Transfer Object From Client to Server
I am designing a distributed application, and to satisfy a single client request, I found myself making multiple calls to a remote interface, which increases the response time beyond acceptable levels. I found out a solution by using DTO (Data Transfer Object).
When designing a data transfer object, you have two primary choices: use a generic collection or create a custom object with explicit getter and setter methods.
A generic collection has the advantage that you only need a single class to fit any data transfer purpose throughout the whole application. The main drawback of using collection objects for DTOs is that the client has to access fields inside the collection either by position index (in the case of a simple array) or by element name (in the case of a keyed collection). Also, collections store items of the same type (usually the most generic Object type), which can lead to subtle but fatal coding errors that cannot be detected at compile time.
Better option would be going with a DTO class object. In Dotnet, it already provides you with a DTO object called Dataset. You can add DataTables, their relationships and transfer across various modules.
Sunday, June 20, 2010
Perl | Could not dupe : Bad file number
After several investigation I found out that after trying to do the ssh->new($host), I am writing close(STDIN). The OS is sun solaris v4. This close of STDIN is creating the problem. I am now using the close STDIN down the line and everything seems to be working perfectly fine now.
Sunday, November 8, 2009
Reflexology
Sunday, October 25, 2009
Send email from UNIX | Perl script
open (MsgFILE, "> $msgFile");
print MsgFILE "\n I am sending an email to all of you \n";
close(MsgFILE);
print "\n sending mail....\n" if $debug;
open (MAIL,"|(cat $msgFile ; uuencode $file $to_file_name) | mailx -r $from -c $MailCc -s \"$Subject\" $to") or die "Cannot open sendmail: $!";
close MAIL;
To set up SSH Keys - UNIX
Login to source server using the your user id
scp id_dsa.pub user@destination_server:./id_dsa.pub
Login to the destination server using the user name and password
cd .ssh
touch authorized_keys2
chmod 600 authorized_keys2
cat ../id_dsa.pub >> authorized_keys2
rm ../id_dsa.pub
Logout from the destination server and try to login from source server again using the following command,
ssh -2 -v user@destination_server
Or
ssh destination_server
vi editor is throwing error '5826'
export EDITOR=vi
Change Password in UNIX
1. If you already know the old password,
then run the command 'passwd'.
2. If you dont remember, better you ask sysadm :)
Wednesday, April 1, 2009
Securing Role Authorization in ASP.NET 2.0
When using role caching securing the roles cookie is of prime importance. This is to stop users modifying the list of roles to which they belong, and to stop intruders from gaining information about the roles used by your application.
* Ensure the cookie is encrypted and integrity checked by setting the cookieProtection attribute to All.
* Ensure that the authorization cookie is only transmitted over HTTPS connections by setting cookieRequireSSL to true.
* Ensure that the roles cookie is not persisted on the client computer by setting createPersistentCookie to false.
* If you cannot use SSL, consider reducing the cookie lifetime by reducing the cookieTimeout value to minimize the time window within which an attacker can use a captured roles cookie to access your site with privileged rights.
* If you are in a scenario where you are concerned about cookie hijacking, consider reducing the timeout and setting slidingExpiration="false".
Here is a sample secured configuration
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="true"
cookieSlidingExpiration="true"
cookieProtection="All"
createPersistentCookie="false">
Sunday, December 7, 2008
Moving files from Windows to Unix
DosToUnix "myQuery.sql"
This will prevent the junk characters which we can find inside the copied sql file.
Thursday, September 4, 2008
GOOGLE WEBBROWSER - CHROME
Google leaked news of the browser yesterday by releasing a comic book (by comics legend Scott McCloud) describing the design decisions that went into the new browser.
For users, Chrome is a brand new web browser with blazing fast load times and a minimalist interface, designed to highlight page content over (ironically) browser chrome. Customary browser features are tucked away behind clever user interface elements, most of which are easily discoverable as you need them.
For developers, Chrome uses the same WebKit rendering engine as Safari, but bundles its own screaming fast JavaScript engine, called V8. The browser's common ancestry with Safari will help to reduce the testing burden on developers of a whole new browser, but when testing is required, Chrome includes a DOM/CSS inspector, an HTTP profiler, and a JavaScript debugger.
Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.
http://www.google.com/chrome/intl/en/features.html
Google says one tab is indepenedent of the other. Even if one page in one tab hangs , it wont affect the other tab.
It will be downloaded as 475 Kb file and on installing it will be downloading from Internet. It took me around 3-4 minutes to download in 2 MBPS internet.
Youtube loaded fantastically fast. WOW...I loved it.
When I tried www.orkut.com. This is what happening. How will I login to Orkut ?????
Wednesday, September 3, 2008
Split Tunneling
Tuesday, September 2, 2008
Binding Handler is Invalid ASP.NET
-> Start> run > services.msc
-> Start the terminal service.
I have seen many of my colleagues say something like "I don't want to enable the Terminal Services service because it’s a security risk".Enabling the Terminal Services service does NOT automatically enable Remote Desktop. If you want Remote Desktop disabled, then uncheck the remote desktop checkbox on the Remote tab of the properties dialog for My Computer. By default, Remote Desktop is disabled on Window XP, so unless you have gone and enabled it, it should already be disabled on your computer.The Terminal Services service is enabled by default because in addition to the Remote Desktop functionality, it also provides for Remote Assistance, Fast User Switching, process listing, DCOM support.
So why does the debugger rely on the Terminal Services service? The answer: Process listing. It turns out that the TS team provides the best task list API in Windows. Both tasklist.exe and taskmgr.exe use the TS service for this, and so it was natural for the debugger to follow their lead. Previous versions of Visual Studio got their task list through other task list APIs, but it turns out that this only works well if you run your code as LocalSystem. This was fine at the time because we had a service. However, for improved security and stability, the debugger got rid of their service for the 2005 release, so we needed to switch to the TS process listing API.
Hibernating Issue in Windows xp
- The user requests the system to hibernate.
- The system appears to think about it for a couple of seconds.
- As the system tries to switch video modes, just before displaying the “Hibernating…” progress bar, the Windows Exclamation sound plays.
- The video mode switches back, and a dialog box opens with the message:
Insufficient System Resources Exist to Complete the API.

fter the problem occcurs, the hibernation option is no longer available to the user. In fact, the hibernation tab normally found in the Power Options is hidden until the next system reboot. I have read the same solution over and over: Apply this hotfix or update your system to Service Pack 2. Unfortunately, I am beginning to wonder how many of these recommendations are coming from users with less than 1 GB of RAM. I personally use a desktop and laptop computer, with 1.25 GB and 1.5 GB of RAM respectively, and both exhibit the problem regardless of the applied hotfix or SP2 (which includes the hotfix). If you count two of my friends who also have this problem, I know of four (4) computers that are adversely affected. In other words, with the only fix currently available, 100% of the computers I have access to are still broken!
2006.09.08
Update: Microsoft has released the hotfix to the public. If you have been needing the hotfix for a language other than English, you may now download it directly from Microsoft’s website.
- Download Link: Update for Windows XP (KB909095)
Wednesday, October 3, 2007
F1 - wow , and again wow !
Without aerodynamic down force, high-performance racing cars have sufficient power to produce wheel spin and loss of control at 160 kph. They usually race at over 300 kph. In a street course race like the Monaco grand prix, the down force provides enough suction to lift manhole covers. Before the race all of the manhole covers on the streets have to be welded down to prevent this from happening!The refuelers used in F1 can supply 12 liters of fuel per second. This means it would take just 4 seconds to fill the tank of an average 50 liter family car. They use the same refueling rigs used on US military helicopters today.The refuelers used in F1 can supply 12 liters of fuel per second. This means it would take just 4 seconds to fill the tank of an average 50 liter family car. They use the same refueling rigs used on US military helicopters today.TOP F1 pit crews can refuel and change tyres in around amazing 3 seconds. During the race the tyres lose weight! Each tyre loses about 0.5 kg in weight due to wear.Normal tyres last 60 000 - 100 000 km. Racing tyres are designed to last 90 - 120 km.A dry-weather F1 tyre reaches peak operating performance (best grip) when tread temperature is between 900C and 1200C.(Water boils at 100C remember) At top speed, F1 tyres rotate 50 times a second.
After coming to know about these point , I just can say "WOW !!!!"