swap Inam

Ranch Hand
+ Follow
since Sep 28, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by swap Inam

Hi All,

Could anybody please provide any help on this......

Thanks in advance
Hi All

New to the EJB's.

Here is the scenario :

Entity Bean (BMT) fetches a 'postgres' database column of type 'bytea'.
If the record size is large say 20MB, it hangs in the fetch.
If the record size is small say 2MB, it works fine.

I guess this is a common scenario already faced by many.

Could I have the possible solutions.

When it hangs while fetching,
[1] is there any way of debugging the same.....
[2] is there any setting for timeout, size in bytes to be fetched...any other setting...

Please let me know if any information is missing from the scenario (using jboss container) ...

Thanks in advance.
Hello All

I have created a JKS file using Keytool and can view it on command line as below :
keytool -list -keystore keystore.jks -v
Enter keystore password:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: mydomain
Creation date: Jan 14, 2009
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Swap Inam, OU=PO, O=PO, L=PO, ST=PO, C=PO
Issuer: CN=Swap Inam, OU=PO, O=PO, L=PO, ST=PO, C=PO
Serial number: 496de2dc
Valid from: Wed Jan 14 18:34:28 IST 2009 until: Tue Apr 14 18:34:28 IST 2009
Certificate fingerprints:
MD5: 07:25:02:86:E2:01:65:4C:4B:46:BD:75:4C:4C:3E:A2
SHA1: 73:CC:38:83:7B:E3:AD:55:36:E4:67:04:9B:72:E6:AF:3D:5F:86:14
Signature algorithm name: SHA1withRSA
Version: 3


*******************************************
*******************************************

when I try to read this file programatically as below :

final KeyStore ks = KeyStore.getInstance("JKS");
ks.load(m_KeyStore.getInput(), m_KeyStore.getPassword());
kmf = getKeySunX509ManagerFactory();
kmf.init(ks, m_KeyStore.getPassword());

// Check if certificates are valid.
final KeyManager[] kmgrs = kmf.getKeyManagers();
for (int i = 0; i < kmgrs.length; i++)
{
if (kmgrs[i] instanceof X509KeyManager)
{
final X509KeyManager mgr = (X509KeyManager) kmgrs[i];
final X509Certificate[] certs = mgr.getCertificateChain(m_KeyStore.getAlias());
if (certs != null)
{
for (int j = 0; j < certs.length; j++)
{
final X509Certificate cert = certs[j];
cert.checkValidity();
}
}
else
{
final String error = "Key Store Certificate Chain incomplete";
LOG.error(error);
throw new AgentException(error);
}
}
}

I always happen to get the error : "Key Store Certificate Chain incomplete" as NULL is returned
for mgr.getCertificateChain(m_KeyStore.getAlias()) in the above code snippet

Why this error is thrown when on command line output above it shows Certificate chain length: 1

Any help is appreciated
Swap
15 years ago
Hi Ranchers,

Am a Newbie to JAAS Authentication.

Was going thru the link Authentication using JAAS

It says

Login modules are written by implementing this interface; they contain the actual code for authentication. It can use various mechanisms to authenticate user credentials. The code could retrieve a password from a database and compare it to the password supplied to the module. It could also use a flat file, LDAP or any other means of storing user information for that purpose.



{1} Is there any JAAS authentication example which uses Flat File repository for User credentials that I can refer to ?

Another link Single Sign On says

Just have each developer to work with a simple JAAS authentication within a local flat file (most of the IDEs have this by default).

In the

Development TIP:

.

{2} Could anybody please elaborate this ?

Thanks in advance.
Swap
15 years ago
Hi All

I am a newbie trying to learn SWT/JFace using Eclipse 3.3.0.

Could any of the boarders, please direct me to online/downloadble PDF for
SWT/JFace, Hello world, programs and how to build and run,
using Eclipse 3.3.o, step by step ?

Thanks in advance
Swap
16 years ago
Hi All,

I am trying to find out which of the JavaMail API's actually fetches the mails from the Mail Server to the Application that fires the JavaMail API,
I am unable to understand which of the following API's actually does it ?
(1) Store.getFolder("INBOX");
(2) getSession().getStore(..)
(3) Folder.getMessageCount(..);
(4) Folder.getMessages(1, totalMessages);

The reason for my confusion is evenif I shutdown the mail server and debug these API's from debugger,
these API's don't throw any exceptions

Any help in this regard is appreaciated

Thanks
Swap
16 years ago
Hi All,

Do we have someway of knowing which RFC's are implemented by JavaMail so far ? Is there such a list available anywhere on internet ?
In particular I am looking out for :
"RFC 974 - Mail routing and the domain system"

Any help in this regard is greatly appreciated.

Regards
Swap
16 years ago
Hi Ulf,

Thanks once again for the response.

Checked on the exchange server and it doesn't receive all the messages.

It seems the problem is with the message id's, in case of multiple threads,
the JavaMail method getMessageID() in MimeMessage, returns same message id
for multiple messages and that's how we end up loosing mails.

Any ideas on how to solve this or any comments

Your comments are greatly appreciated.

Regards and Thanks a lot
Swap
16 years ago
Hi Ulf

Thanks a lot for your response.

Yes, will sure verify if exchange is receiving all the messages.

BUT, still have a query, why it works with single thread and doesn't
in multithreaded mode when the Log file shows no exceptions/error and
exactly the same number of emails sent as is expected ?

How the email clients end up receiving exact number of mails as were sent with single sender thread and less when multiple threads are used ?

Would greatly appreciate your comments

Thanks a lot
Swap
16 years ago
Hi All,

I have a mail program which is using JavaMail API 1.4ea
It is configurable for number of threads to be used for sending outgoing mails. When there is only one thread for sending outgoing mail, program works fine. When there are multiple threads, say, 2,3 or 4, for sending outgoing mails, few of the mails are lost. For e.g. If 100 outgoing messages are sent, only 97 are received in Outlook Express.
Anybody has encountered this scenario or aware of what could be the cause ?

There are following cases to be considered
(1) Is there any setting on Exchange Server for this ?
(2) Tried with different mail clients but still messages received are less than messages sent.
(3) When Logs are enabled using "-Dmail.debug=true" and "logging.properties" file, the Log shows all the messages as sent

Could anybody throw some light on this ?
Any comments will be greatly appreciated.

Thanks
Swapnil
16 years ago
Hi All

Any advice on Java Code Analyzer which will analyze multithreaded
java code for deadlock, synchronization problems ?

Anybody tried the codeanalyzer : Java Path Finder ?

Any advice is greately appreciated.

Thanks
SI
Hi Jeanne

Thanks a lot for the Reply.

Thanks again
SI
Hi all

Could anybody please point me to a good tutorial or any other material to start Eclipse Plugin Development ?

Thanks
SI
But evenif we don't give option -Dmail.debug, anybody can give that option, suppose we distribute say Z.JAR to customer, which uses JavaMail API with the BAT or SH file to run with command say "java -cp "..." Z.JAR",
anybody with some knowledge of Java and Java Mail API can modify,
this BAT or SH file to read as "java -Dmail.debug=true -cp ".." Z.JAR
and see the password

Isn't it possible ???
17 years ago