Andrew Moko

Ranch Hand
+ Follow
since Dec 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Andrew Moko

You need to go back to your scjp notes. It's a whole topic that can't simply be explained in a sentence.

But, simply put you don't have to worry about implementing your own safety methods just so classes/ methods/ variables are EXCLUSIVE. This mainly achieved by synchronization, wait()/ notify() etc etc.

Unless you want to do something very specific with the 'unconsumed 'message, i'd replace the Topic with a Message Queue. Messages on the queue are redelivered on failured attempts/ timeouts
I don't see the Handler progressHandler in the MainActivity class being initialized. Learn to read and follow through the error stack messages.
12 years ago
at com.myapp.test.ProgressInputStream.sendLong(ProgressInputStream.java:76)
12 years ago
We need to view your code.

The java program doing the upload uses a set of libraries/ apis which OBVIOUSLY don't work in android.

Alternatively, fire-up another file upload app (with startActivity) and receive the response in your logic..
12 years ago

karthik kummar wrote:Hi Friends i am new to java beans. i am trying to implement Simple MDB using Netbean tool. but in client programming, i am getting error at JNDI lookup line. i am using JBOSS as server. my coding details are given below.

MDB code:



ejb-jar.xml:





jboss.xml:




client code:





MDB is deploying without any error, but while run the client program 21st line searching for connection factory getting failed with error as null pointer exception whether i have to change in *.xml files. could you please advice on this.



It simply means You have a NPE AND You need to initialize the jndiContext and optionally pass in the environmental configuration variables to the constructor:

Context jndiContext = new InitialContext(); // use default environmental vars
or
jndiContext = new InitialContext(env); // env - configuration property file with env. variables.

I'm thinking of a fast algorithm to get kony off his hide holes,. any ideas??
12 years ago

Wendy Gibbons wrote:sorry a DOH moment, hashmaps DOH.



LOL

*off for my coffee break TGIF*
This is a jndi issue. I would navigate to the JNDI tree on the weblogic console and verify the bean interface mapped name

Wendy Gibbons wrote:

Andrew Moko wrote:

Wendy Gibbons wrote:I do, you can either have 20 small classes, or 1 enum each with it's own method

can you show me how you would do it with generics?



Sure. Here's my two centavos..



This method allows languages to be set dynamically without necessarily modifying the LocalizationDataModel class.



you haven't shown how you get the language class from the ID that is supplied, how you get rid of that big case statement?





I'm i missing out something??


Wendy Gibbons wrote:I do, you can either have 20 small classes, or 1 enum each with it's own method

can you show me how you would do it with generics?



Sure. Here's my two centavos..



This method allows languages to be set dynamically without necessarily modifying the LocalizationDataModel class.
Yes. You need an "ajax-push-server" technology to dynamically push data from server-client.

http://en.wikipedia.org/wiki/Comet_%28programming%29
12 years ago
JSP

Wendy Gibbons wrote:Have a look at enums (not enumerations)

here is a good page:
http://docs.oracle.com/javase/1.5.0/docs/guide/language/enums.html

I would make a method in ModelToCheck that took a language and s_TheTranslation, then this code could be inside model to check.

then inside model to check it could use the enum.

here is some psuedo code, because how to get the correct enum from the id is a bit of a learnt trick (it will not compile)




Who uses enums, Wendy ;)

Proper use of generics brings out well-laid out, short understandable code and abstracts complexity. I'd create a generic method on modelToCheck that takes a language type. Inside the method check the language and call the appropriate method/ functions.

Looks like the OP wants his requirements fit the EJB technology. I still remember the hype that came with design patterns most developers would complicate a simple logic just to take advantage of the patterns.

Should you be binding or looking up the data source???