Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jndi in midlets

 
jawwad ahmed
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we use jndi in midlet application for locating the ejb.
Thanks
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MIDP is not designed to work with enterprise Java backends. You should wrap your EJB functions in HTTP/XML (like web services) and access them through normal HTTP connections.
 
jawwad ahmed
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's ok.
but Actually when i send png format picture from website to mobile(as in my final year project).the mobile have to be connected in non-visual manner to that website(as in chatting soft ware but non visual).Then i can send card to mobile other wise with out creating socket how i will establish connection to particular mobile to whom i am sending.
thanks a lot.
jawwad ahmed
scjp
scwcd
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think your mobile device should create a socket connection to the image server and "pull" the image. It can check for new images every a couple of minutes to make it appear that the images are "push"ed over.
If you want the mobile device to accept inbound connections, you have to write some sort of server software to listen to a port. You image server also needsto know the IP of the mobile device at anytime. A lot of trouble.
 
jawwad ahmed
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well thanks i think mobile have always to be connected to that server so when ever the server has to send message it search from the database and send the picture is it right.
Thanks.
jawwad ahmed
.........
scjp2
scwcd
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic