Looking for some good info on JMS

hi all
i am learning about JMS and i am trying to understand the process. i have been using search engines to help me locate some documents so i can begin reading up on JMS but i get back so many hits... i become overwhelmed.
can anyone provide some good links to start with
i am looking to take basic xml files and write a small program to place the xml files on a queue... any links that maybe useful???
thanks in advance -- annie :) smiles

Hi Annie,
Have you tried this
http://java.sun.com/products/jms/tutorial/
Regards,
Sebastien Degardin

Similar Messages

  • Looking for some good documents on performance tunning

    Hi,
    please excuse me, as this is not a technical issue.as i am looking for some good ebooks ,can anybody suggest me some good site from where i can download free. or any metalink number.
    Message was edited by:
    user00726

    Hi,
    Its great to chat with you.. !!
    Really, I am impressed with the things what you have written.
    We are very lucky that such type of Great Person is in ORACLE World.
    As I am eagerly searching for "Practical Oracle8i(TM): Building Efficient Databases " an Hard Copy to read. But, its very hard to find it.
    I had seen Amazon for $44.20, In Our Currency its too high Almost 2000/-
    Can you share with us alteast an PDF Copy of that book.
    It's a request. from my side. and I will be very thankful to you.
    I am searching nearly from past 3 Months.
    Can you write some Book on RAC. I am searching for Good one...
    Thanks & Regards,
    Pavan Kumar N

  • Looking for some good Arc and Circle drawing pdf code.

    Hi I am looking for some suggestions on how to draw circles and arcs using PDF. My arcs have recently started to be drawn as chords in Adobe Reader 9.1.1. I am looking for example code o this nature (I know this is not circle or arc code this is just an example):
    b
    0 0 0 RG 0 0 0 rg
    1 w 98 -156 m 104 -154 l 104 -158 l 0 0 0 RG 0 0 0 rg
    b
    0 0 0 RG 0 0 0 rg
    1 w 398 -156 m 392 -154 l 392 -158 l 0 0 0 RG 0 0 0 rg
    b
    0 0 0 RG 0 0 0 rg
    1 w 98 -156 m 396 -156 l S
    BT /F1 10 Tf 243 -151 Td (1.5") Tj ET
    1 w 398 -196 m 392 -194 l 392 -198 l 0 0 0 RG 0 0 0 rg
    b
    i.e. actual PDF tokens.
    If you know of a website that feature such examples I would appreciate the URL too.
    Thanks

    Jem,
    Pardon me if I sound rude by suggesting that before you launch into an expensive printing job (which could result in disastrous consequences if you don't do it right) that you actually learn how to use the program first. You may also want to learn something about the offset printing process and how to prepare print jobs.
    Even many Illustrator novices know that there is no such thing as a background in Illustrator, in the sense that there is in Photoshop. You will need to PLACE your Photoshop background as a high resolution CMYK tiff in the provided template. That's the answer to your second question. I don't really understand your first question. Maybe someone else will. Are you simply asking, "where do I begin?" If so, then you REALLY REALLY need to read a book on how to use Illustrator. The Adobe Illustrator Classroom in a Book might be the place to start.
    "I'm pretty good with CPR. I'm helping a friend do his vasectomy and I already have all the equipment (scalpels, thread, etc.) I'm just having trouble figuring out where to cut."

  • New Ipad User looking for some good CRM suggestions for small business

    Hello All,
    I am a new (and satisfied) Apple Ipad2 user.  I am the sales rep for a small business that is in the health care field.  I am looking for a good CRM program for the following reasons and I am wanting to know if there is a particular program that can provide any of these things for me:
    Ability to put in all of my customers information.  Seperate folders for each.
    Ability to add information to customer folders/files based on recent phoen conversations or actual on-site visits.
    Ability to set a reminder of when to call back on that customer to see status of his/her patient that was fit with our product.
    Ability to allow other members of the company to check in on this information as well.
    A little background, we are a small company in the health care field.  We have 90 customers currently and we are growing at a steady pace.  I would like for my upper management to look at the CRM at any point and see what is going on with each customer.  If I sell a product to Customer A, then I would like a reminder to pop up 6 months from now when that patient will be ready for another product.  I would also like to be able to update a customer file so that management can see when I called on a customer, etc.
    I appreciate everyone's input as I have never utilized a CRM program.  I am currently using Dropbox for all of this right now, but it seems like a CRM would be more organized,
    Thank you,
    --Ryan

    HI Ryan,
    Did you find an app for CRM, one thing that I'm also curious about, you may need to find one that is HIPPA compliant.
    James

  • Looking for some good text effects type plugins for CS5 or CS5.5

    I have a website that I am updating and I wanted to create some really cool text effects. The effects are something that I want to create in After Effects to give it the movie effect with sounds, etc.
    What I'm looking for is some add-on software that can boost the text. Any ideas?
    Thanks

    Since you're brand-new here, there's a VERY crucial question to ask: have you ever used After Effects before?
    The reason: it's not the kind of application you use for a couple of tricks with and expect things to turn out right the first time.  It takes a good knowledge of the AE basics to make it do what you want.
    So how do you get the basics?  You go here.
    ...and if you need this animation in a big hurry, you might want to have a Plan B ready to go.

  • RDBMS Realm Schema Properties - newbie looking for some general info

    I am new to the world of WL Security Realms. I am trying to better
    understand what is involved in setting up a RDBMS Security Realm and
    speficially the Schema Properties within that security realm.
    The situation that I am trying to solve right now is that I want to
    provide authentication for a given application using a "user list"
    from another DB that our application will have access to via JDBC.
    First off, would using the RDBMS security realm allow me to do
    something along these lines - ie access a "user list" from another DB?
    If YES, then what sort of things would have to be done from the
    schema properties standpoint in order to make this possible?
    Note that the other DB will also be an Oracle instance managed by
    WebLogic, the same as with our application, if it makes a difference
    in any way.
    Thanks for the help.
    Chris Baglieri

    You need to configure the schema so that it fits in with your database
    getGroupMembers=SELECT GM_GROUP, GM_MEMBER from groupmembers WHERE GM_GROUP
    = ?
    deleteGroup2=DELETE FROM aclentries WHERE A_PRINCIPAL = ?
    deleteGroup1=DELETE FROM groupmembers WHERE GM_GROUP = ?
    addGroupMember=INSERT INTO groupmembers VALUES ( ? , ? )
    getUser=SELECT U_NAME, U_PASSWORD FROM users WHERE U_NAME = ?
    getPermission=SELECT DISTINCT A_PERMISSION FROM aclentries WHERE
    A_PERMISSION = ?
    deleteUser3=DELETE FROM aclentries WHERE A_PRINCIPAL = ?
    deleteUser2=DELETE FROM groupmembers WHERE GM_MEMBER = ?
    getGroupNewStatement=true
    deleteUser1=DELETE FROM users WHERE U_NAME = ?
    getAcls=SELECT A_NAME, A_PRINCIPAL, A_PERMISSION FROM aclentries ORDER BY
    A_NAME, A_PRINCIPAL
    getUsers=SELECT U_NAME, U_PASSWORD FROM users
    getGroups=SELECT GM_GROUP, GM_MEMBER FROM groupmembers
    getPermissions=SELECT DISTINCT A_PERMISSION FROM aclentries
    getAclEntries=SELECT A_NAME, A_PRINCIPAL, A_PERMISSION FROM aclentries WHERE
    A_NAME = ? ORDER BY A_PRINCIPAL
    newUser=INSERT INTO users VALUES ( ? , ? )
    removeGroupMember=DELETE FROM groupmembers WHERE GM_GROUP = ? AND GM_MEMBER
    = ?
    (Taken from bea's example RDBMS Realm)
    Modify this to fit in with your schema
    "Chris Baglieri" <[email protected]> wrote in message
    news:[email protected]...
    I am new to the world of WL Security Realms. I am trying to better
    understand what is involved in setting up a RDBMS Security Realm and
    speficially the Schema Properties within that security realm.
    The situation that I am trying to solve right now is that I want to
    provide authentication for a given application using a "user list"
    from another DB that our application will have access to via JDBC.
    First off, would using the RDBMS security realm allow me to do
    something along these lines - ie access a "user list" from another DB?
    If YES, then what sort of things would have to be done from the
    schema properties standpoint in order to make this possible?
    Note that the other DB will also be an Oracle instance managed by
    WebLogic, the same as with our application, if it makes a difference
    in any way.
    Thanks for the help.
    Chris Baglieri

  • Looking for some info before deciding to install

    Normally, I would try to some searching before posting, but I've been pressed for time lately. Anyways, I'm looking for some info about Solaris before deciding to dive into installing it.
    1) Can it be installed on what's a currently triple-booting system without problems? In this case, Solaris would be installed onto half of the slave HD.
    2) How difficult and lengthy is the installation process?
    3) Does Solaris come with it's own unique bootloader? Can it recognize other operating systems? Is it possible to not install that bootloader and simply edit the configs for a preexisting GRUB to allow it to boot Solaris?

    The only way to get content into the Music app is via iTunes store downloads or syncing with itunes on a computer. You will need to find a third party media player such as VLC (whick integrates with DropBox and GoogleDrive, if that appeals to you).

  • Looking for some info, Creative is not much help.

    Looking for some info, Creative is not much help. Ok, right now I have an Audigy 2 ZS Platinum. It can use the digital inputs to decode either Dolby Digital, DD EX, DTS, and DTS ES to the analog speaker outputs. (Also a 5. setup.)
    I recently built a new PC, and would like to replace the sound card, but I use that feature (as well as some others). Seeing how Creative doesn't want to easily display the capabilities of there cards, I would like someone to let me know what card will allow the fallowing in Windows XP, Vista, and theoretically Windows 7.
    Hardware decoding of Dolby Digital, DD EX, DTS, and DTS ES and allow a proper 5. playback through analog speakers.
    Recording of whatever is playing out of the the speakers. The recording selection is labeled "What U Hear")
    The reasons behind me wanting to buy a new card are simply that I would prefer to run it through PCI-Express, and have full compatibility at the release of Windows 7 without any loss of features I need. From what I can tell, if things work in Windows Vista they will work in [email protected]

    All I can say to you (someone correct me if I'm wrong) is that Xtremegamer's doesn't decode DD/DTS via hardware with official drivers (altough they're capable of - all X-Fi are capable of decoding). XtremeMusic does the job with official drivers. I don't know the rest of the models. Someone adds [email protected]

  • I am trying to download and install OSX Mavericks but everytime i input my Apple ID it keeps asking to review my account and then starts looking for credit card info, I do not have a credit card, also I thought OSX Mavericks was free, some help please.

    I am trying to download and install OSX Mavericks but everytime i input my Apple ID it keeps asking to review my account and then starts looking for credit card info, I do not have a credit card, also I thought OSX Mavericks was free, some help please.

    Yes I know it's free, but Im trying to find out how to download it and install, but I keep getting account review and asked for CC details as I have no CC I can't get the download or install it, any help please, what i don't understand is why would I be asked for CC details if it is a free download ?? i just want to know is there anything I can do.

  • Looking for a good note taking app: Are there new features for the Notes app in iOS6?

    Hi,
    I've read that the Notes app with Mountain Lion will be available for OS X as well, and I was wondering if there will be any significant updates to the Notes app coming in iOS 6?
    The Notes app in Mountain Lion supports, as far as I know, text formatting, images and attachments. The Notes app in iOS 5 does not have any of these features, yet still it is claimed that the OS X client will sync with the iPhone, iPad and iPod touch. This means that there must be some rather significant updates coming for the Notes app in iOS 6 to match up with the features of its Mac counterpart. Still, no updates to the Notes app are listed in any of the iOS 6 feature lists I've seen so far.
    I'm looking for a good note taking app for OS X and iOS. I don't like how Springpad works, neither did Evernote work out for me, it's just too complex - I like Simplenote a lot though, it's just that its approach is too radical in my opinion. I was thinking that the Mountain Lion Notes app might be a good alternative because it combines simplicity with rich text formatting and attachments. I kind of hate the skeuomorphic user interface though.
    best, Ian

    You are only addressing other iPad users here & no Apple employees. We have no way of knowing, so you'll have to wait until iOS 6 is released.
    Here's some general info.
    Working with Notes and Documents on the iPad – Alternatives & Suggestions
    http://ipadacademy.com/2012/04/working-with-notes-and-documents-on-the-ipad-alte rnatives-suggestions
     Cheers, Tom

  • Looking for some assurances that I haven't made a mistake switching to Mac.

    Bought an intel-powered IMac 9 days ago and love everything about it's look, functionality, etc.. Only problem: I've had a bout of "Application has closed unexpectedly" occcurrances while using Safari (while at AOL.com deleting emails from aol account) and while editing pics in iPhoto. As this happened time and again, I got a sad, sinking feeling that I'm headed for the same frustrations that I've had w/ every Windows machine I've ever owned. Ugh!..I switched to Apple for the specific purpose of avoiding crashes!!! Apple support walked me through steps to fix (removed/updated Quicktime, and check a few other things..). They were very helpful, but... I absolutely detest having to do this. Other than Office:Mac, i've added nothing to this machine! I'm really stressed about this. I paid far more for this than I would have for a Windows machine simply because I had heard that Apple machines don't do this sort of thing!!
    Please tell me that this is normal and expected with a new machine and not a harbinger of more complicated problems to come!! I'm hoping that once resolved, I won't much more of this.. On the other hand, if many of you feel that this issue is a bad omen, I'll take the machine back while I still can. ..What a pity though, it's truly been a joy to use so far.
    IMAC (early 2006)   Mac OS X (10.4.4)  

    Hi syd123! And Welcome to Discussions!
    No you haven't made a mistake! You will love your Mac!
    Deleting AOL Mail, crashes Safari (Consolidation)
    It seems the most recent Safari, and or 10.4.4, update has created this problem.
    Apple & AOL are both aware of this, but, as far as I know, no correction has been implemented.
    Here are some of the work arounds, that I have been able to discern from the various posts regarding this issue.
    Use the FIREFOX BROWSER.
    Use your AOL Mail program.
    Use this utility AOL SERVICES ASSISTANT, to set up Apple Mail, to access AOL Mail.
    Access the AOL Mail thru Classic AOL Webmail.
    And here are links, to the various threads, discussing this issue.
    <a href="http://discussions.apple.com/thread.jspa?threadID=314479&start=0&tstart=0 "Safari and AOL</a>
    AOL/ Delete/ Safari crash
    safari crashing with aol.com mail deletion
    AOL Webmail and Safari on 10.4.2 crashes on delete mail
    Update 10.4.4 causes crash
    Safari crashes when deleting email on AOL
    Safari Update
    Safari Crashes AOL mail
    Safari Crashes when Deleting or Reporting E-Mail as SPAM on AOL Web Mail
    Looking for some assurances that I haven't made a mistake switching to Mac. This Thread
    Good Luck!
    ali b

  • I'm looking for some help connecting linksys IP Cameras to my home network to monitor my property when I'm travelling. I used to do this with linksys WAPS, but since I've discarded all my old linksys networking and standardized on airport, I can't get the

    I'm looking for some help connecting linksys IP Cameras to my home network to monitor my property when I'm travelling.  I used to do this with linksys WAPS, but since I've discarded all my old linksys networking and standardized on airport, I can't get these things working.  I know that I have to identify my camera through the DHCP table and set up port forwarding and there is the problem. 
    My network consists of 4  base stations set up in a roaming network - same network name and passwords.  I need to do it this way so I don't have to switch network when I move from one side of the house to the other, go to the cabana, or my shop in the barn.  The network works pretty well since I went to a roaming set up.  Good performance, yata, yata, yata.
    However, the roaming network requires the AEBS's to be set up in bridge mode, rather than sharing an ip address.  When the AEBS is set to  bridge mode, you don't see a DCHP table or have the ability to identify your IP Cam through the AEBS - and hence, no port forwarding. 
    I am able to identify and set up my Linksys IP Cam by locating the ip address on my FIOS router, even though, it's plugged into an AEBS.  I set it up, see the video, remove the ethernet cable from the IP Cam, restart - and I can't get to it from an AEBS.  In researching this, it appears, I should be setting up the AEBS to "share an IP Address", going to the DHCP table and identifying the camera's IP address and setting up port forwarding.  However, you don't see any of the DHCP or port forwarding options in Airport Network Utility when configuring in bridge mode. 
    I'm hoping I'm missing something here and that the solution isn't to set it up at the FIOS router level, but I'm beginning to think that's my only hope.  What concerns me there is that I should be able to see the IP cam on the network without port forwarding since I'm not coming from outside, and I can't even do this unless it's connected hard wire.
    I'd appreciate any insight into this that anyone might have.  I've hit the wall with what I know.
    Thanks.

    In a roaming network, your "main" router is the device that would require port mapping/forwarding to be configured in order to access the IP camera from the Internet. This router is also the one that would be provide the private IP address for the camera which you will want to be a static one.
    So as you described your network, the IP cameras should be getting an IP address or you assigned it a static one and this is the address that you would enter in the Private IP address (or equivalent depending on the router used) field when setting up port mapping.
    If you are not able to access this camera from the local network, then this should be troubleshot first.

  • Looking for a good movie maker app for iPad 1

    Hi Everybody-
      I am looking for a good Photo/Movie maker for the iPad 1. Something that I can add Photos/Movies together and add some songs and have editing capabilities for all of it and possiabily export it as well to my PC to burn to DVD/CD.
    So if anybody can give my recomondations, I'd really appriciate it.There some good ones, but not for the iPad 1. So I wanted to get all of your suggestions so I can narrow down my search. Please let me know if you need further information as well.
    Thanks so much for your time.
    Sincerely- Douglas

    There are no movie maker apps in the App Store that will work well on the iPad 1, it just doesn't have enough RAM. If you read the reviews for the Avid app in the App Store everyone with an iPad 1 is complaining about it. iMovie, as you probably already knew, does not have a version for the iPad 1.
    Wait for the iPad 3 and then set about making movies, the 1 (which I also have) just does not have the horsepower for what you want to do.

  • New(?) pattern looking for a good home

    Hi everyone, this is my second post to sun forums about this, I initially asked people for help with the decorator and strategy pattern on the general Java Programming forum not being aware that there was a specific section for design pattern related questions. Since then I refined my solution somewhat and was wondering if anyone here would take a look. Sorry about the length of my post, I know it's best to keep it brief but in this case it just seemed that a fully functional example was more important than keeping it short.
    So what I'd like to ask is whether any of you have seen this pattern before and if so, then what is it called. I'm also looking for some fresh eyes on this, this example I wrote seems to work but there are a lot of subtleties to the problem so any help figuring out if I went wrong anywhere is greatly appreciated. Please do tell me if you think this is an insane approach to the problem -- in short, might this pattern have a chance at finding a good home or should it be put down?
    The intent of the pattern I am giving below is to modify behavior of an object at runtime through composition. In effect, it is like strategy pattern, except that the effect is achieved by wrapping, and wrapping can be done multiple times so the effect is cumulative. Wrapper class is a subclass of the class whose instance is being wrapped, and the change of behavior is accomplished by overriding methods in the wrapper class. After wrapping, the object "mutates" and starts to behave as if it was an instance of the wrapper class.
    Here's the example:
    public class Test {
         public static void main(String[] args) {
              double[] data = { 1, 1, 1, 1 };
              ModifiableChannel ch1 = new ModifiableChannel();
              ch1.fill(data);
              // ch2 shifts ch1 down by 1
              ModifiableChannel ch2 = new DownShiftedChannel(ch1, 1);
              // ch3A shifts ch2 down by 1
              ModifiableChannel ch3A = new DownShiftedChannel(ch2, 1);
              // ch3B shifts ch2 up by 1, tests independence from ch3A
              ModifiableChannel ch3B = new UpShiftedChannel(ch2, 1);
              // ch4 shifts ch3A up by 1, data now looks same as ch2
              ModifiableChannel ch4 = new UpShiftedChannel(ch3A, 1);
              // print channels:
              System.out.println("ch1:");
              printChannel(ch1);
              System.out.println("ch2:");
              printChannel(ch2);
              System.out.println("ch3A:");
              printChannel(ch3A);
              System.out.println("ch3B:");
              printChannel(ch3B);
              System.out.println("ch4:");
              printChannel(ch4);
         public static void printChannel(Channel channel) {
              for(int i = 0; i < channel.size(); i++) {
                   System.out.println(channel.get(i) + "");
              // Note how channel's getAverage() method "sees"
              // the changes that each wrapper imposes on top
              // of the original object.
              System.out.println("avg=" + channel.getAverage());
    * A Channel is a simple container for data that can
    * find its average. Think audio channel or any other
    * kind of sampled data.
    public interface Channel {
         public void fill(double[] data);
         public double get(int i);
         public double getAverage();
         public int size();
    public class DefaultChannel implements Channel {
         private double[] data;
         public void fill(double[] data) {
              this.data = new double[data.length];
              for(int i = 0; i < data.length; i++)
                   this.data[i] = data;
         public double get(int i) {
              if(i < 0 || i >= data.length)
                   throw new IndexOutOfBoundsException("Incorrect index.");
              return data[i];
         public double getAverage() {
              if(data.length == 0) return 0;
              double average = this.get(0);
              for(int i = 1; i < data.length; i++) {
                   average = average * i / (i + 1) + this.get(i) / (i + 1);
              return average;
         public int size() {
              return data.length;
    public class ModifiableChannel extends DefaultChannel {
         protected ChannelModifier modifier;
         public void fill(double[] data) {
              if (modifier != null) {
                   modifier.fill(data);
              } else {
                   super.fill(data);
         public void _fill(double[] data) {
              super.fill(data);
         public double get(int i) {
              if(modifier != null)
                   return modifier.get(i);
              else
                   return super.get(i);
         public double _get(int i) {
              return super.get(i);
         public double getAverage() {
              if (modifier != null) {
                   return modifier.getAverage();
              } else {
                   return super.getAverage();
         public double _getAverage() {
              return super.getAverage();
    public class ChannelModifier extends ModifiableChannel {
         protected ModifiableChannel delegate;
         protected ModifiableChannel root;
         protected ChannelModifier tmpModifier;
         protected boolean doSwap = true;
         private void pre() {
              if(doSwap) { // we only want to swap out modifiers once when the
                   // top call in the chain is made, after that we want to
                   // proceed without it and finally restore doSwap to original
                   // state once ChannelModifier is reached.
                   tmpModifier = root.modifier;
                   root.modifier = this;
                   if(delegate instanceof ChannelModifier)
                        ((ChannelModifier)delegate).doSwap = false;
         private void post() {
              if (doSwap) {
                   root.modifier = tmpModifier;
              } else {
                   if(delegate instanceof ChannelModifier)
                             ((ChannelModifier)delegate).doSwap = true;
         public ChannelModifier(ModifiableChannel delegate) {
              if(delegate instanceof ChannelModifier)
                   this.root = ((ChannelModifier)delegate).root;
              else
                   this.root = delegate;
              this.delegate = delegate;
         public void fill(double[] data) {
              pre();
              if(delegate instanceof ChannelModifier)
                   delegate.fill(data);
              else
                   delegate._fill(data);
              post();
         public double get(int i) {
              pre();
              double result;
              if(delegate instanceof ChannelModifier)
                   result = delegate.get(i);
              else
                   result = delegate._get(i);
              post();
              return result;
         public double getAverage() {
              pre();
              double result;
              if(delegate instanceof ChannelModifier)
                   result = delegate.getAverage();
              else
                   result = delegate._getAverage();
              post();
              return result;
         public int size() {
              //for simplicity no support for modifying size()
              return delegate.size();
    public class DownShiftedChannel extends ChannelModifier {
         private double shift;
         public DownShiftedChannel(ModifiableChannel channel, final double shift) {
              super(channel);
              this.shift = shift;
         @Override
         public double get(int i) {
              return super.get(i) - shift;
    public class UpShiftedChannel extends ChannelModifier {
         private double shift;
         public UpShiftedChannel(ModifiableChannel channel, final double shift) {
              super(channel);
              this.shift = shift;
         @Override
         public double get(int i) {
              return super.get(i) + shift;
    Output:ch1:
    1.0
    1.0
    1.0
    1.0
    avg=1.0
    ch2:
    0.0
    0.0
    0.0
    0.0
    avg=0.0
    ch3A:
    -1.0
    -1.0
    -1.0
    -1.0
    avg=-1.0
    ch3B:
    1.0
    1.0
    1.0
    1.0
    avg=1.0
    ch4:
    0.0
    0.0
    0.0
    0.0
    avg=0.0

    jduprez wrote:
    Hello,
    unless you sell your design better, I deem it is an inferior derivation of the Adapter pattern.
    In the Adapter pattern, the adaptee doesn't have to be designed to support adaptation, and the instance doesn't even know at runtime whether it is adapted.
    Your design makes the "modifiable" class aware of the modification, and it needs to be explicitly designed to be modifiable (in particular this constrains the implementation hierarchy). Overall DesignPattern are meant to provide flexibility, your version offers less flexibility than Adapter, as it poses more constraint on the modifiable class.
    Another sign of this inflexibility is your instanceof checks.
    On an unrelated note, I intensely dislike your naming choice of fill() vs _fill()+, I prefer more explicit names (I cannot provide you one as I didn't understand the purpose of this dual method, which a good name would have avoided, by the way).
    That being said, I haven't followed your original problem, so I am not aware of the constraints that led you to this design.
    Best regards,
    J.
    Edited by: jduprez on Mar 22, 2010 10:56 PMThank you for your input, I will try to explain my design better. First of all, as I understand it the Adapter pattern is meant to translate one interface into another. This is not at all what I am trying to do here, I am trying to keep the same interface but modify behavior of objects through composition. I started thinking about how to do this when I was trying to apply the Decorator pattern to filter some data. The way I would do that in my example here is to write an AbstractChannelDecorator that delegates all methods to the Channel it wraps:
    public abstract class AbstractChannelDecorator implements Channel {
            protected Channel delegate;
    ...// code ommitted
         public double getAverage() {
              return delegate.getAverage();
    ...// code ommitted
    }and then to filter the data I would extend it with concrete classes and override the appropriate methods like so:
    public class DownShiftedChannel extends AbstractChannelDecorator {
         ...// code ommitted
         public double get(int i) {
              return super.get(i) - shift;
           ...// code ommitted
    }(I am just shifting the data here to simplify the examples but a more realistic example would be something like a moving average filter to smooth the data).
    Unfortunately this doesn't get me what I want, because getAverage() method doesn't use the filtered data unless I override it in the concrete decorator, but that means I will have to re-implement the whole algorithm. So that's pretty much my motivation for this, how do I use what on the surface looks like a Decorator pattern, but in reality works more like inheritance?
    Now as to the other points of critique you mentioned:
    I understand your dislike for such method names, I'm sorry about that, I had to come up with some way for the ChannelModifier to call ModifiableChannel's super's method equivalents. I needed some way to have the innermost wrapped object to initiate a call to the topmost ChannelModifier, but only do it once -- that was one way to do it. I suppose I could have done it with a flag and another if/else statement in each of the methods, or if you prefer, the naming convention could have been fill() and super_fill(), get() and super_get(), I didn't really think that it was that important. Anyway, those methods are not meant to be used by any other class except ChannelModifier so I probably should have made them protected.
    The instanceof checks are necessary because at some point ChannelModifier instance runs into a delegate that isn't a ChannelModifier and I have to somehow detect that, because otherwise instead of calling get() I'd call get() which in ModifiableChannel would take me back up to the topmost wrapper and start the whole call chain again, so we'd be in infinite recursion. But calling get() allows me to prevent that and go straight to the original method of the innermost wrapped object.
    I completely agree with you that the example I presented has limited flexibility in supporting multiple implementations. If I had two different Channel implementations I would need two ModifiableChannel classes, two ChannelModifiers, and two sets of concrete implementations -- obviously that's not good. Not to worry though, I found a way around that. Here's what I came up with, it's a modification of my original example with DefaultChannel replaced by ChannelImplementation1,2:
    public class ChannelImplementation1 implements Channel { ... }
    public class ChannelImplementation2 implements Channel { ... }
    // this interface allows implementations to be interchangeable in ChannelModifier
    public interface ModifiableChannel {
         public double super_get(int i);
         public double super_getAverage();
         public void setModifier(ChannelModifier modifier);
         public ChannelModifier getModifier();
    public class ModifiableChannelImplementation1
              extends ChannelImplementation1
              implements ModifiableChannel {
         ... // see DefaultChannel in my original example
    public class ModifiableChannelImplementation2
              extends ChannelImplementation1
              implements ModifiableChannel { ...}
    // ChannelModifier is a Channel, but more importantly, it takes a Channel,
    // not any specific implementation of it, so in effect the user has complete
    // flexibility as to what implementation to use.
    public class ChannelModifier implements Channel {
         protected Channel delegate;
         protected Channel root;
         protected ChannelModifier tmpModifier;
         protected boolean doSwap = true;
         public ChannelModifier(Channel delegate) {
              if(delegate instanceof ChannelModifier)
                   this.root = ((ChannelModifier)delegate).root;
              else
                   this.root = delegate;
              this.delegate = delegate;
         private void pre() {
              if(doSwap) {
                   if(root instanceof ModifiableChannel) {
                        ModifiableChannel root = (ModifiableChannel)this.root;
                        tmpModifier = root.getModifier();
                        root.setModifier(this);
                   if(delegate instanceof ChannelModifier)
                        ((ChannelModifier)delegate).doSwap = false;
         private void post() {
              if (doSwap) {
                   if(root instanceof ModifiableChannel) {
                        ModifiableChannel root = (ModifiableChannel)this.root;
                        root.setModifier(tmpModifier);
              } else {
                   if(delegate instanceof ChannelModifier)
                             ((ChannelModifier)delegate).doSwap = true;
         public void fill(double[] data) {
              delegate.fill(data);
         public double get(int i) {
              pre();
              double result;
              if(delegate instanceof ModifiableChannel)
    // I've changed the naming convention from _get() to super_get(), I think that may help show the intent of the call
                   result = ((ModifiableChannel)delegate).super_get(i);
              else
                   result = delegate.get(i);               
              post();
              return result;
         public double getAverage() {
              pre();
              double result;
              if(delegate instanceof ModifiableChannel)
                   result = ((ModifiableChannel)delegate).super_getAverage();
              else
                   result = delegate.getAverage();
              post();
              return result;
         public int size() {
              return delegate.size();
    public class UpShiftedChannel extends ChannelModifier { ...}
    public class DownShiftedChannel extends ChannelModifier { ... }

  • Looking for a good usb hub that will allow my mouse and external hard to work together

    I'm looking for some ideas for a good usb hub that will allow me to use a wireless mouse and an external hard drive at the same time, without shorting out the mouse.  The one i currently have, when I plug in just the mouse, it's fine, but as soon as i put the external hard drive into the hub port, the mouse no longer works and i have to reinstall the drivers for the mouse.

    Hubs and computers vary in their power needs, but it seems that your setup is lacking in the power department. This isn't a big deal with desktop computers, but since you use a MBP, you're going to do best with a powered USB hub.
    If you're looking for a USB hub with power supply, Belkin is generally reliable (and above average in price). But the D-Link is compact, reliable, and has a good price. Aim for a USB 3.0 hub if possible, though 2.0 will work fine with just about anything. Insist on a refund if the hub doesn't work in your system. Make sure it's compact, since you'll be carrrying it around.

Maybe you are looking for

  • Can't ADD printer

    I believe that this started immediately after upgrading to 10.4.6, but I'm not absolutely sure of that: Whenever I use Printer Setup Utility and reach the point of ADDing the driver for my printer (an Epson Stylus Color 777i), I always get the dreade

  • Initializing Factory class with Digital Signature

    Hi All, I am trying to Initialize the Factory class using digital signature. These are the steps I fallowed. 1. Created a Java application "Application1" in Jdeveloper. 2. Copied config, ext, lib folder from the Design console directory to the Applic

  • 11g forms builder is not able to initiate the Internet explorer

    Hi, my problem is that my forms builder is not able to open the form in IE during compilation if Internet explorer is not already running but it is able to open the form in a new tab if Internet explorer is already running. My system's specifications

  • Release Strategy in MM PO document

    Hi,     Could you please any one can clear my doubt in Release Procedure for P.O/PR. I can configure release procedure two level based on value.    Now my doubt is where these two different users going to get their authority. Is it through Parameter

  • REM-Subcontract

    Hi, How to handle operation subcontracting in repetitive manufacturing? As in descrete PR will be created, after releasing production order.. Can any body help me? Thanks, Raj