Koms Alam

Greenhorn
+ Follow
since Jul 29, 2008
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 Koms Alam

Hi Rob,
Thank you very much for your time. Actually I had googled and tried to find the solution before posting in java ranch. But Didn't get any useful link that tells,
1. How to Convert AFP file in Java Program without using third party product. or
2. Any Open source free product/code that does the same and can be integrated to java program.

Regards,
Koms Alam
14 years ago
Hi,

Is there any way to read IBM ".AFP" file in java and convert the same to different file formats like PDF,XML,XLS,Text etc ?

Can it be done using any open source java tool ?

Regrads,
Koms Alam
14 years ago
Hi,

I need to use TimerManager in our project. I was testing it on RAD6.0.1,
using DefaultTimerManager with JNDI name java/comp/env/tm/default.

However when I do lookup for that JNDI Name in a servlet it was giving error like this
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is com.ibm.ws.asynchbeans.exception.AsynchBeanException: ASYN0069E: TimerManager java/comp/env/tm/default is being looked up without using resource reference.

The code in servlet for look up is
InitialContext ctx = new InitialContext();
TimerManager mgr = (TimerManager)
ctx.lookup(

java/comp/env/tm/default

);
I tried

java:comp/env/tm/default

, but that too gave error like javax.naming.NameNotFoundException: Name comp/env/tm not found in context "java:".

In web.xml corresponding resource reference entry is
<resource-ref>
<res-ref-name>tm/default</res-ref-name>
<res-type>commonj.timer.TimerManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
I tried giving the full JNDI Name in <res-ref-name> but it did not work.

Not able to find why the error is coming. Please help.

Regards,
Koms Alam
15 years ago
Hi,

I'm using java mail API to send mail.
When Content Type is text/plain (which is by default), can we format the the text of the mail ? ie. some section marked BOLD or Italic or URL etc.
If yes, please let me know how to do it.
15 years ago
Hi Martijn,

Thanks for your recommendation to use Quartz Timer/EJB Timer.
I want one more help from you.
Which one would be better to use, Quartz Timer or EJB Timer?
(I'm using Rational Application Developer(RAD) 6.0 for development purpose and highest EJB version is 2.1 here.)
15 years ago
Hi Martijn,
We don't have much details(Internal Working) about "ES", What we are told is how to call(invoke API) it. And was told like, after "ES" call we should wait for 5 mins, because internally ES takes maximum 5 mins to complete the process. Had it acknowledged process completion, somehow(like the one mentioned, publishing to some topic)it would have been very helpful to solve the problem. But "ES" is a legacy system. Those people don't want to modify it.
Anyway, your suggestion was very good. Thank you very for your time and reply.
15 years ago
Hi Martijn, thank you again...

Regarding the Client's wait, Client is making a synchronous call. If we start processing both the mails immediately(which means it would take at least 5mins) isn't the client blocked for 5mins ?

Regarding your suggestion of using JMS, client will not be blocked this way.
But how do we process the request?
A listener will get both the Requests(MailRequest1 and 2) from MQ. Now we need to send Mail1 first that includes an asynch call to "ES". After we call "ES" we have to wait for 5 mins to send Mail1. Now how do we wait for 5mins if we are not allowed to use Thread ?
Once Mail1 sent, we can send Mail2.
15 years ago
Thanks Martijn for your valuable time and patience to go through it,

Here are the clarifications...

1.)Client doesn't want any reply...however if we don't store the request and start processing to send Mail1 first and then Mail2 immediately afer Client calls our API, these process would take atleast 5 mins. Until Mail2 is delivered Client has to wait in this case.
Instead we store the requets, make asynch call to "ES" and immediately return. This way client need not wait for 5 mins.

2.) The Work Manager service provides a high-level programming model that enables applications to logically execute multiple work items concurrently under the control of the container. In essence, the work manager provides a container-managed alternative to using the java.lang.Thread, which is inappropriate for use within applications hosted in managed environments.
(The Timer and Work Manager for Application Servers specification provides a concurrent programming API for use within managed environments on the Java TM platform, such as Servlets and EJBs)

3.) If we store only CustomMailRequest2, then we need to send Mail1 immediately. But for Mail1, we call "ES" which takes 5 mins to complete.
So, till that time Client has to wait.

4.) No ransactions invloved, but Mail2 should be sent only after Mail1 is sent. We don't bother about Mail2 delivery failure.

5.)WorkManagerAPI will be responsible for what you are saying, ie sending Mail1, and then triggering Mail2.
15 years ago
We have a requirement like this...

1. We are getting an ArrayList from external system("Client") which contains two CustomMailRequest(CustomMailRequest1 and CustomMailRequest2).
2. Need to send two separate mails( assume Mail1 and Mail2) for these two requests.
3. Mail2 is delivered using third party system.
4. Mail1 is delivered using java mail API. But before sending Mail1 we do some processing inluding asynchronous call to third party system "ES" that takes 5 mins to complete. Mail1 can be sent 5 minutes after this "ES" call is made.
5. Mail2 has dependency on Mail1, ie Mail2 can be sent only after Mail1 is sent.
6. We don't want to block "Client" which sends the ArrayList, for 5 mins. So once we get request from Client, we've thouht to do the following
a. serialize and store the ArrayList, alongwith currentTimeStamp and Status="Unprocessed" temporarily in DB
b. make the asynchronous call to "ES"
c. We'll have WorkManagerAPI that'll run continuosly to get record from DB based on TimeStamp and Status and will make calls to send both the mails Mail1 and Mail2, and then update status="Processed" or delete the record.
***********************************************************************
Now, what all other approaches can be considerd for this apart from storing the object in DB and the having WorkManagerAPI to process them later? We are not supposed to create thread(and make it wait for 5 mins).
15 years ago
Hi Shiva,

Wireframes are simple HTML Pages with static data displayed on it, so as we know how the actual application looks like.

So, wireframes actually never communaicates to any data source( I mean it doesn't connect to any DB,File etc to get dynamic data). You just need to design html pages which you want your final application to look like.

So in your case,
1. design a standard login page with UID,PWD as textbox and buttons(submit,reset etc) on it.
(You can write javascript code for Login Information Validation against some hardcoded value, though it's not standard practise to inlude error/exception pages in wireframes. Wireframes are html pages linking to each other without botherring about the what data user enters,instead it concentrates on how the page looks like and proper liking for navigation.)

2.Design the html page where you want the user to go after successful login. link this page from login page submit button.


Regards,
Komrul
15 years ago