ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Duplicate java package

Post new topic  Reply to topic
 Duplicate java package « View previous topic :: View next topic » 
Author Message
rglack10
PostPosted: Tue Aug 09, 2011 9:38 am    Post subject: Duplicate java package Reply with quote

Apprentice

Joined: 06 Jul 2011
Posts: 34

Hi,

Not sure if this question is relevant or not...

If importing a package into a JCN and the toolkit is offering two identical imports for the same package but one is:

java.io

and the other is:

com.ibm.jvm.util

1) Is there a difference?
2) Is there a preferrable option?

One would appear to be the proprietary java sun package and the other native to IBM's JRE...

Would there be any performance / any other benefits with the latter or like the V6 broker JRE could there be bugs? Any ideas?

Thanks.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Aug 09, 2011 10:33 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Yes, there is a difference. Choose the library that matches the source code you just scrapped of the internet.

More than likely, more cases than not, it is the one with the shorter package name.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
rglack10
PostPosted: Tue Aug 09, 2011 10:49 am    Post subject: Reply with quote

Apprentice

Joined: 06 Jul 2011
Posts: 34

[quote="lancelotlinc"]Yes, there is a difference. Choose the library that matches the source code you just scrapped of the internet.

Why do you say this?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 09, 2011 10:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

rglack10 wrote:
Why do you say this?


Just because two classes have the same NAME doesn't mean they do remotely the same things or define remotely the same methods or members.
Back to top
View user's profile Send private message
rglack10
PostPosted: Tue Aug 09, 2011 11:01 am    Post subject: Reply with quote

Apprentice

Joined: 06 Jul 2011
Posts: 34

mqjeff wrote:
rglack10 wrote:
Why do you say this?


Just because two classes have the same NAME doesn't mean they do remotely the same things or define remotely the same methods or members.


Agreed but does it also mean they definitely aren't the same and in the case that they are was maybe the reason for the original question. Where does the presumption come that someone has scraped code off the internet? This I don't understand.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 09, 2011 11:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's not clear why you wouldn't know which package to use, if you had written this code yourself.

So that's likely why lancelotlinc is guessing that you have taken this code from somewhere else.

It's, in general, not clear why you don't know which package to use!
Back to top
View user's profile Send private message
rglack10
PostPosted: Tue Aug 09, 2011 11:12 am    Post subject: Reply with quote

Apprentice

Joined: 06 Jul 2011
Posts: 34

mqjeff wrote:
It's not clear why you wouldn't know which package to use, if you had written this code yourself.

So that's likely why lancelotlinc is guessing that you have taken this code from somewhere else.

It's, in general, not clear why you don't know which package to use!


But of course I know which package to use... I would use the native package for the class when investigating my requirements. That was not the question...

Thanks for the input.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 09, 2011 11:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

rglack10 wrote:
But of course I know which package to use... I would use the native package for the class when investigating my requirements. That was not the question...


Your question was
rglack10 wrote:

If importing a package into a JCN and the toolkit is offering two identical imports for the same package
1) Is there a difference?
2) Is there a preferable option?


How is that *not* the same as "Which of these two packages do I use"?

To specifically answer your question as asked
1) Yes. The two packages represent different implementations of classes that happen to share the same name
2) Yes. The preferable option is to use the CORRECT package for the class that's making the import.
Back to top
View user's profile Send private message
rglack10
PostPosted: Tue Aug 09, 2011 12:10 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Jul 2011
Posts: 34

mqjeff wrote:
rglack10 wrote:
But of course I know which package to use... I would use the native package for the class when investigating my requirements. That was not the question...


Your question was
rglack10 wrote:

If importing a package into a JCN and the toolkit is offering two identical imports for the same package
1) Is there a difference?
2) Is there a preferable option?


How is that *not* the same as "Which of these two packages do I use"?

To specifically answer your question as asked
1) Yes. The two packages represent different implementations of classes that happen to share the same name
2) Yes. The preferable option is to use the CORRECT package for the class that's making the import.


Thanks for answering my question. Point 1 of your responses I wasn't 100% about hence the question.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Duplicate java package
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.