Numb - that's what my gtalk status message is !
Friends ask, "Numb ??" and I reply, "Yeah...Numb !!"
I never set these kind of status message before, I did't even think of putting it before. The word just came in mind and I just set it. I thought about it later when friends started asking, "why numb ??". The first thing I realise when I gave a thought is that, I was just better. It feels good. I don't know why this feeling is there but its just there. It might be just because of the last month's nonsense, which I faced, and it will not gonna effect me anymore if it happens again. That nonsense was horrible, I was just fighting against my own emotions.
NUMB-nothing like that effects me anymore, no matter what happens good or bad, it's fine with me. Hope everything will be fine soon, just the way it was before. Till then I'm enjoying what is around... ;-)
Friday, June 08, 2007
Tuesday, November 14, 2006
Want to sing...
Ah ha! So finally after a long time I got something interesting to do...
I remember last time when I started RnD work on decoding MP3 file...uff!!! that was so frustating. I banged my head for around 5 days continously, but all in vain, except that I learn to read at least ID3 Tag Information. Atleast I got something...
I have been to mumbai last weekend, the trip was awesome, enjoyed a lot. Tonnes of thanks to my fosla friends in Mumbai and Gyanu. There I came across an article on Ogg Vorbis another audio file format equivalent to MP3 files. The most interesting thing is that it is open source where as MP3 is patented that means you have to pay but this one is totally free for both commercial and non-commercial use. The compression ratio is also high. Good naaa ;-)
Hope my code will sing this format. :-)
I remember last time when I started RnD work on decoding MP3 file...uff!!! that was so frustating. I banged my head for around 5 days continously, but all in vain, except that I learn to read at least ID3 Tag Information. Atleast I got something...
I have been to mumbai last weekend, the trip was awesome, enjoyed a lot. Tonnes of thanks to my fosla friends in Mumbai and Gyanu. There I came across an article on Ogg Vorbis another audio file format equivalent to MP3 files. The most interesting thing is that it is open source where as MP3 is patented that means you have to pay but this one is totally free for both commercial and non-commercial use. The compression ratio is also high. Good naaa ;-)
Hope my code will sing this format. :-)
Friday, October 06, 2006
Pool connection
Here is a quick way to make a connection pool...
Here are the details of the attributes used in xml file.
Note: For more details check commons-dbcp documentation.
Thanks
E ñ j Ô ÿ !!! iN D
p 0 o l
:-)
- Get the jar file, that will be specific to the database to which you want to connect and place it in the /WEB-INF/lib folder.
- And edit /META-INF/context.xml...
<Context reloadable="true">
....
<Resource
name = "jdbc/dbtest"
auth = "Container"
type = "javax.sql.DataSource"
factory = "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
driverClassName = "org.postgresql.Driver"
url = "jdbc:postgresql://IPAddress:port/databasename"
username = "root"
password = "root"
maxActive = "5"
initialSize = "3"
maxIdle = "2"
maxWait = "10000"
removeAbandoned = "true"
removeAbandonedTimeout = "60"
logAbandoned = "true"
/>
....
</Context> - Java code to get connection from the pool...
InitialContext initCtx = new InitialContext();
Context ctx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource) ctx.lookup("jdbc/dbtest");
conn = ds.getConnection();
Here are the details of the attributes used in xml file.
- Name: The java:comp/env prefix is the name of the JNDI context for the component. This is used in the Java code. The jdbc/dbtest string is the JNDI name for the resource reference. The JNDI names for JDBC DataSource objects are stored in the java:comp/env/jdbc subcontext.
- auth: Authration will be done by container. I don't know much about this. Will update soon.
- driverClassName: Fully qualified Java class name of the JDBC driver to be used.
- url: Connection URL to be passed to JDBC driver.
- username: Database login username.
- password: Database login password.
- maxActive: (Default: 8) The maximum number of active instances that can be allocated from this pool at the same time.
- maxIdle: (Default: 8) The maximum number of connections that can sit idle in this pool at the same time.
- maxWait: (Deafult: indefinitely) The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception.
- initialSize: (Default: 0) The initial size of the pool.
- removeAbandoned: (Default: false) Flag to remove abandoned connections if they exceed the removeAbandonedTimout. If set to true a connection is considered abandoned and eligible for removal if it has been idle longer than the removeAbandonedTimeout. Setting this to true can recover db connections from poorly written applications which fail to close a connection.
- removeAbandonedTimeout: (Default 300) Timeout in seconds before an abandoned connection can be removed.
- logAbandoned: (Default: false) Flag to log stack traces for application code which abandoned a Statement or Connection.
Note: For more details check commons-dbcp documentation.
Thanks
E ñ j Ô ÿ !!! iN D
p 0 o l
:-)
Subscribe to:
Posts (Atom)