CS4: Reusable compositions / objects?

I may be overlooking something terribly obvious, certainly wouldn't be the first time...
As someone with a software development background, I tend to think in terms of building a library of objects and reusing them across projects. For example, I'm working on a series of videos and there are some 3d compositions I've built which are essentially the background for various text messages. In a perfect world, I would create this object once, and then be able to import / reference it and use in multiple AE projects. It would also be nice to paramaterize the text so that I could essentially drop an object into a timeline and at a certain point tell it, "here's your text."
Currently, the only option I see is to create an AE project, create the composition / object, and then just dupe it wherever needed. However, this approach would mean that if I wanted to reuse the same object in every show, I would have to put every episode of every season in the same AE project in order to reference it. The alternative would be a "save as" scenario for each episode, but of course that means if I need to change anything in the composition that I'm reusing, I'd have to replicate those changes in a boat load of AE projects (one for each episode). Can't imagine that the pros do it this way.
The fact that I'm fairly new to this coupled with the incredible power I see in AE leads me to believe that the kind of reuse I'm looking for is probably possible, I'm just too much of a noob to understand how. For that matter, I'm not even sure what concepts I should be looking for in the manual, making my typical desire for RTFM a bit constrained.
If I haven't been too obtuse in my explanations of what I'm trying to accomplish, could any of you point me to the right spots in the manual (or other resources) so that I can learn how to build a reusable (and perhaps even parameterized) compositi8on / object?
Alternatively, if this sort of thing just ain't possible, I'd love to hear how you guys go about handline these sorts of scenarios in your production environment.
Thanks!

Hey, man.
Thanks for taking the time to help.
Yeah, that sort of import is pretty much the same as the "save as" scenario in that regard. From the looks of it, I don't know how the Adobe guys could ripple in future changes, as it's essentially a copy and paste operation. Once you've iomported (pasted) the stuff in, you're free to edit and change it any way you like. Wouldn't want to be the programmer trying to figure out how to unwind all the changes you made after the initial import, which is probably why they don't offer that feature.
I was hoping that there was a way of saving compositions / objects out as some sort of reusable binary-ish object. These apps (AE, PrPro, etc.) were clearly written in C++ (I see crash messages with the .cpp filename referenced). From that perspective, what I was hping for would be analagous to creating a Library project in C++. Code it, compile it, and then the project using it simply imports the binary .lib file and references the appropriate objects. Of course, that's meaningless in AE, just trying to illustrate.
Appreciate the ideas, though!

Similar Messages

  • CS4's 3d object not working in snow leopard

    when my system was leopard, photoshop cs4's 3d object is working properly...but when i upgraded it to snow cs4 indicates that the feature no longer support it....why was it? T_T

    when my system was leopard, photoshop cs4's 3d object is working properly...but when i upgraded it to snow cs4 indicates that the feature no longer support it....why was it? T_T

  • How to POST the data though Rest services though composite object.

    I am new to REST services.
    I need to write REST Serivices to post(Update) the data using Composite object.
    I created the structure to pass the composite object from jquery to the REST services.
    How can i handle that composite object in REST Services URITemplate and interface methods.
    can i have sample code to handle the composite object in REST Services?
    Thanks in advance.

    Did you check this post?
    http://sharepoint.stackexchange.com/questions/25222/posting-json-to-a-rest-wcf-endpoint-in-sharepoint-using-cksdev
    --Cheers

  • CS4 Render 3D object

    Hoping someone can help....
    I've been making painting baked textures in Photoshop for years but now I've finally decided to learn how to make more complex textures with bump and specular maps etc...
    I got cs4 extended primarily because I figured I could use its 3d functions to check my work; like make a quick cube - slap on the diffuse, bump, normal maps and view the composite texture with a variety of light settings and from different angles.
    So far... yeah it kinda works okay.. I've figured that other programs would be more appropriate but I'm happy enough except...
    When I press 'Render for Final Output' it ruins the texture! Like it all looks fine (if a little jaggy) until i press that button and then it all goes sort of lumpy grey looking.. the maps still work but detail is missing.... also i get little pinky highlights.... I've looked at the render settings but I can't see any reason why it just shouldn't be on the 'solid' preset.
    I naturally thought that when i rendered something then it would look better...
    Am I missing something...?

    Hiya Steve
    Firstly thanks very much indeed for the suggestions..
    Anyway I tried what you suggested and set my cube to 'ray traced' but unfortunately it still goes really wild looking when I render it. I've tried turning the lighting right down but to no avail...
    I'm actually at my wit's end with this.. I've tried everything one little step at a time to try and work out where I'm going wrong but everything looks cool until I press that dreaded 'R' button lol.. I really need to sort this out because I need some simple way of checking my bump maps, alpha maps etc.. look right without investing time and money in a proper 3D prog.
    I'm going to upload the file somewhere - it's too big for an attachment here, and provide a link in case anyone out there fancies having a lil' look - despite my labours it's probably something really silly that I'm overlooking.

  • CS4 - Problems selecting objects

    I have recently upgraded to Fireworks CS4 from CS3 but I
    don't think that this problem has been there always in CS4.
    Basically, I create a document with a few layer groups. Then
    place an image in one layer group, input some text in another etc.
    If I then want to select the image, I have to click on the layer
    group or layer itself in the layers palette before Fireworks allows
    me to select it. I'm sure that I used to just be able to click on
    anything to select it.
    I first noticed this behavior when working on a document
    where I created a few layer groups that I then shard between pages,
    but subsequently I have had this happen on all docs including very
    simple ones.
    Any help greatly appreciated.
    Kind regards
    Tom

    Heathrowe
    You are a saviour! Thanks so much, really appreciate that - I
    must have selected it by mistake when I was sharing layers between
    pages. You just stopped me trashing prefs and trying it in a new
    user. Awesome.
    Tom

  • Two-way bindings on composite objects

    Does anyone know of a way to get two-way bindings to work for a ComboBox that uses objects (not just simple Strings) which contain other objects?
    For Strings in 'objectToBindWith' bindings work fine of course. But if you have some other type of object inside, the compiler chokes with "Cannot assign to a non-reference value" when doing a 2-way binding.
    public class SomeObject {
         public var name:String;//Two-way works fine for simple types (of course ALL examples use this simple case...)
         public var refData:RefData;//No worky
    public class RefData {
         public var id:Number;
         public var code:String;
         public var description:String;
    [Bindable]
    private var objectToBindWith:SomeObject;
    [Bindable]
    private var someReferenceDataList:ArrayCollection; //This would be a list of "RefData" objects in this case.
    <mx:ComboBox dataProvider="{someReferenceDataList}" selectedItem="@{objectToBindWith.refData as RefData}" labelField="description"/>
    Now I would have "hoped" that a two way binding would attempt to select (from the dataProvider list) the matching object (if any) being set as selectedItem, as well as set the value of objectToBindWidth.refData to the selectedItem when that changes... but I guess this is too much to expect?  Are there any simple ways to make this work as intended?

    Yeah, I don't think this would work because the selectedItem has to part of the dataProvider--not just an object with the same values. Also, you can't use the selectedItem property in MXML.
    So, just to show how it could be made to work, you could use <mx:Binding>, like:
            <mx:Binding
             source="rdObject"
             destination="cb1.selectedItem"/>
    ...where you define rdObject like:
    [Bindable]
    private var rdObject:Object = ac1.getItemAt(2);
    Now it will work because rdObject actually points to an item in the Combo Box' dataProvider.
    In order to update the selectedItem property on the fly, you'd have to resort setting it manually as needed, either by changing rdObject, or using a cursor on the dataProvider to search for a given value, then setting selectedItem with that (like, cb1.selectedItem = cursor.current).
    I'd also point out that this really isn't two-way binding that you are attempting; it's more like double-binding on the same component.
    OK, well if you MUST extend ComboBox, you could do this (this is from a custom MXML component I made which extends ComBox, and uses an override on selectedItem):
                //Used to store a pre-selection default; optional.
                [Bindable]
                private var _DEFAULT_SELECTION:Object;
            public override function set selectedItem(value:Object):void{
                if (value != this.selectedItem){
                    super.selectedItem = value;
                    //set the default selection here for comparison later.
                    //Store off the _DEFAULT_SELECTION value.
                    //If selectedItem was not specified, _DEFAULT_SELECTION will simply be null.
                    _DEFAULT_SELECTION = value;
                }else{
    THEN you could access selectedItem directly in MXML, and bind to it.
    HTH

  • How to Export/Import Composite Objects(CLOB,Nested Table)

    I am trying to export the database containing BLOB, Nested Tables etc. and wants to import the same. But i am getting an error. Pleease help as to how i will proceed with it. This is something very urgent. please reply . i will be very thankful to you

    The only solution I've found so far as a workaround is rather convoluted.
    1. I took an export using datapump's expdp of SCHEMA1 (in 10g it will skip the table with the xmltype).
    2. I imported the data to my empty schema (SCHEMA2) using impdp. To avoid the error that the type already exists with another OID, I used the TRANSFORM=oid:n parameter e.g.
    impdp user/pwd dumpfile=noxmltable.dmp logfile=importallbutxmltable.log remap_schema=SCHEMA1:SCHEMA2 TRANSFORM=oid:n directory=MYDUMPDIR
    3. I then manually created my xmltype table in the SCHEMA2 and did a select into to load it (make sure you have the select privileges to do so):
    INSERT INTO SCHEMA2.XMLTABLE2 SELECT * FROM SCHEMA1.XMLTABLE1;
    4. I am still taking an export with exp of the xmltable as well even though I'm not sure I can do anything with it.
    Thanks!
    Edited by: stacyz on Jul 28, 2009 9:49 AM

  • Odd behavior when using custom Composite/CompositeContext and antialiasing

    Hi,
    I created a custom Composite/CompositeContext class and when I use it with antialiasing it causes a black bar to appear. I seems it has nothing to do with the compose() code but just that fact that I set my own Composite object. The submitted code will show you what I mean. There are 3 check boxes 1) allows to use the custom Composite object, 2) allows to ignore the compose() code in the CompositeContext and 3) toggles the antialiasing flag in the rendering hints. When the antialiasing flag is set and the Composite object is used the bar appears regardless of if the compose() method is executed or not. If the Composite object is not used the bar goes away.
    The Composite/CompositeContext class performs clipping and gradient paint using a Ellipse2D.Float instance.
    a) When the Composite is not used the code does a rectangular fill.
    b) When the Composite is used it should clip the rectangular fill to only the inside of a circle and do a gradient merge of background color and current color.
    c) If the compose() method is ignored then only the background is painted.
    d) When antialiasing is turned on the black bar appears, i) if you ignore the compose() method it remains, ii) if you do not use the Composite object the bar disappears (???)
    NOTE: the compose method's code is only for illustration purposes, I know that AlphaComposite, clipping and/or Gradient paint can be used to do what the example does. What I am trying to find out is why the fact of simply using my Composite object with antialiasing will cause the odd behavior.  Been trying to figure it out but haven't, any help is appreciated.
    Thx.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                for(int sy = src.getMinY(); sy < src.getMinY() + src.getHeight(); sy++) {
                    for(int sx = src.getMinX(); sx < src.getMinX() + src.getWidth(); sx++) {
                        int cx = sx - dstOut.getSampleModelTranslateX();
                        int cy = sy - dstOut.getSampleModelTranslateY();
                        if(!clippingShape.contains(cx, cy)) continue;
                        srcPixel = src.getPixel(sx, sy, srcPixel);
                        int ox = dstOut.getMinX() + sx - src.getMinX();
                        int oy = dstOut.getMinY() + sy - src.getMinY();
                        if(ox < dstOut.getMinX() || ox >= dstOut.getMinX() + dstOut.getWidth()) continue;
                        if(oy < dstOut.getMinY() || oy >= dstOut.getMinY() + dstOut.getHeight()) continue;
                        dstPixel = dstIn.getPixel(ox, oy, dstPixel);
                        float mergeFactor = 1.0f * (cy - 100) / 100;
                        dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                        dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                        dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                        dstOut.setPixel(ox, oy, dstPixel);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

    I got a better version to work as expected. Though there will probably be issues with the transformation to display coordinates as mentioned before. At least figured out some of the kinks of using a custom Composite/CompositeContext object.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
    //            dumpRaster("SRC   ", src);
    //            dumpRaster("DSTIN ", dstIn);
    //            dumpRaster("DSTOUT", dstOut);
    //            System.out.println();
                if(dstIn != dstOut)
                    dstOut.setDataElements(0, 0, dstIn);
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                int w = Math.min(src.getWidth(), dstIn.getWidth());
                int h = Math.min(src.getHeight(), dstIn.getHeight());
                int xMax = src.getMinX() + w;
                int yMax = src.getMinY() + h;
                for(int x = src.getMinX(); x < xMax; x++) {
                    for(int y = src.getMinY(); y < yMax; y++) {
                        try {
                            // THIS MIGHT NOT WORK ALL THE TIME
                            int cx = x - dstIn.getSampleModelTranslateX();
                            int cy = y - dstIn.getSampleModelTranslateY();
                            if(!clippingShape.contains(cx, cy)) {
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                dstOut.setPixel(x, y, dstPixel);
                            else {
                                srcPixel = src.getPixel(x, y, srcPixel);
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                float mergeFactor = 1.0f * (cy - 100) / 100;
                                dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                                dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                                dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                                dstOut.setPixel(x, y, dstPixel);
                        catch(Throwable t) {
                            System.out.println(t.getMessage() + " x=" + x + " y=" + y);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            protected void dumpRaster(String lbl,
                                      Raster raster) {
                System.out.print(lbl + ":");
                System.out.print(" mx=" + format(raster.getMinX()));
                System.out.print(" my=" + format(raster.getMinY()));
                System.out.print(" rw=" + format(raster.getWidth()));
                System.out.print(" rh=" + format(raster.getHeight()));
                System.out.print(" tx=" + format(raster.getSampleModelTranslateX()));
                System.out.print(" ty=" + format(raster.getSampleModelTranslateY()));
                System.out.print(" sm=" + raster.getSampleModel().getClass().getName());
                System.out.println();
            protected String format(int value) {
                String txt = Integer.toString(value);
                while(txt.length() < 4)
                    txt = " " + txt;
                return txt;
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

  • CS4 - Bring back old way of masking PLEASE!!!!! (or at least a toggle/pref)

    Please, please, please add a preference or toggle to allow CS4 to mask objects in the old way.
    Whilst I can see the benefits to CS4s new way of masking it also has some big disadvantages for many reasons. It would be handy if there was a toggle or preference that allows users to work in the old or new way.

    Don't get me wrong of course I can see the advantage of now not being able to 'accidentally' select objects outside the mask (all personally this has never been a problem to me as long as I grouped my masks) but what makes this new way of masking a little unworkable is the fact that when you select a Mask and its contents the only path that is highlighted is the mask itself. I can make this new way of masking work for me and I can see its advantage but it needs tweaking -
    1.Id like to see a change so that when you select a mask and its contents that all the paths are highlighted, not just the mask shape, even if the paths that are highlighted are just the clipped contents within the mask shape but as long as its more than just the clipping path. Otherwise it seems pretty easy to pick objects up and not realise they are a masked group, especially when picking up complicated files that have been created by another person. Also this will enable snap to point to work within the mask at least. (All though I have noticed that by turning Smart Guides on you can get around this)
    2.Despite what one or two of you say there are occasions when I need to edit the contents of a mask, inside and outside a mask so I would definitely like to see the direct select tool marquee option re-introduced. This will enable people who need to work at high speed to only have to work with one tool selected and by using a combination of shift, Alt and Command can still carry on working without having to flick between different tools. One example for editing contents outside the mask would be adjusting blends that follow a path/spine shape. (I havent tested this yet but I really hope this is still workable with the new way of masking).
    3.There are lost of occasions when we set up an Artwork on a packaging cutter guide with various images placed around the pack, these images will be masked and the images are all set to a template size so that it enables us to work very quickly across 100 or so language packs. Quite often these images will move around the pack as the client changes their mind where they would like them. Normally its a simple procedure of using the picture image corner (Outside the mask) to snap to point to another position/guide on the template but as we cant select outside the mask we can no longer do this. All the masks could be completely different shapes so we cant use that to snap to point so the only way around it now is to replace the links instead of moving them, which is a lot slower. (I could explain why but Im sure you know). So thats one good reason why it would be really handy to have a toggle or pref to quickly flick between one method or another.

  • Urgent: How to find out the size in bytes of java object

    Hi Experts,
    We've a requirement that we need to find out the size of a java object at run time, is there a direct java API to get the size of a composite object in memory?
    Here is my requirement: We are adding string objects (which is an xml string of considerable size) into a List. After reaching certain size limit (lets say 5MB) of the list i need to put this data into DB as a CLOB. So every time I add a string object to the list, I need to see if the total size of the list exceeds the limit and if yes, flush the results into DB.
    I am not sure if java has a direct API for this, if not what is the beast way to do it, it s critical requirement for us.
    It would be really great if someone could help us out.
    Thank you,
    -Shibu.

    >
    We've a requirement that we need to find out the size of a java object at run time, is there a direct java API to get the size of a composite object in memory?
    Here is my requirement: We are adding string objects (which is an xml string of considerable size) into a List. After reaching certain size limit (lets say 5MB) of the list i need to put this data into DB as a CLOB. So every time I add a string object to the list, I need to see if the total size of the list exceeds the limit and if yes, flush the results into DB.
    I am not sure if java has a direct API for this, if not what is the beast way to do it, it s critical requirement for us.
    It would be really great if someone could help us out.
    >
    Could you explain your actual requirement a little more fully.
    1. Is each individual string a separate XML string? Or is it just a fragment? Why would you just concatenate them together into a CLOB? That won't produce valid XML and it won't let you easily separate the pieces again later. So provide a simple example showing some strings and how you need to manipulate them.
    2. Are you using these xml strings in Java at all? Or are you just loading them into the database?
    For example if you are just loading them into the database you don't need to create a list. Just create a CLOB in Java and append each string to the CLOB. Before you append each one you can check to see if the new string will put you over your length limit. If it will then you write the CLOB to the database, empty the CLOB and start appending again to the new clob instance.
    If you explain what you are really trying to do we might be able to suggest some better ways to do it.

  • How do you declare objects in the master database

    I am trying to register our CLR assembly as an unsafe assembly without having to make the database trustworthy.  Since making the database is_trustworthy_on = 1 is not a best practice, and would cause some of our customers (and our development process)
    a little bit of grief.
    I have read a ton about it but am still having trouble.
    The reason the assembly is 'Unsafe' is because it is calling the TimeZoneInfo class to convert between timezones, since we are not yet on UTC dates.  We plan to in the future but that's a big project.
    We are also not using the 'SQLCLR' but rather have written our own class library and just have a project reference to it, which works just the same, but we have found to be better for the C# programmers.
    I am playing with signing the assembly using an SNK file and have figured out what I need to do, including 1) creating a master key, 2) creating an asymmetric key using the same SNK file that signed the assembly, 3) creating a login for the asymmetric key,
    and 4) granting unsafe assembly to the login.
    When I do all that with straight SQL, it actually works!  But I am having trouble fitting this into our SSDT world.
    Should I create a separate SSDT project for items #1 through #4 above, and reference it, and check 'Include composite objects' in our publishing options?  As stated in this blog post though, I'm terrified of messing up the master database, and I'm not
    excited about the overhead of another project, a 2nd dacpac, etc.
    http://blogs.msdn.com/b/ssdt/archive/2012/06/26/composite-projects-and-schema-compare.aspx
    Since we do use a common set of deployment options in a deployment tool we wrote, which does set the 'block on data loss' to false, and the 'drop objects not in source' to true, b/c we drop tables all the time during the course of refactoring, etc. 
    I don't want to drop anything in master though, and I don't want to have to publish it separately if we didn't have to. 
    I suppose I could just have some dynamic SQL in a pre-deployment script that takes care of the master database, but I was trying to do it the 'right' way, in a declarative style, but struggling.
    So, in short, what's the recommended approach for getting an 'unsafe' CLR assembly into an SSDT project?
    The error that started all this was:
    CREATE ASSEMBLY for assembly *** failed because assembly *** is not authorized for PERMISSION_SET = UNSAFE. 
    The assembly is authorized when either of the following is true:
    the database owner (DBO) has UNSAFE ASSEMBLY permission and the database has the TRUSTWORTHY database property on;
    or
    the assembly is signed with a certificate or an asymmetric key that has a corresponding login with UNSAFE ASSEMBLY permission.
    Also, would a certificate be better than an asymmetric key?  I'm not entirely sure of the difference just yet to be honest.
    Thanks,
    Ryan

    After much fighting with this, figured something out as a workaround, and thought I'd share it.
    First, I'm pretty certain the SSDT declarative way for these master objects just doesn't work yet.
    My workaround was to make a pre-deployment script (that runs when we create new databases, as well as for the current release), that takes care of the security items needed to support a signed CLR assembly with unsafe permissions.
    One issue we were running into was when it came to creating the asymmetric key, there are 4 ways to do so, and we didn't want to depend on a hard-coded/absolute file path.  The 4 ways are "From file", "from external file", "from
    assembly", or "from provider".  I still don't 100% understand the from provider way, but ultimately we are actually using the from assembly way, with a little trick/hack I did that allows us to not have to use the 'from file' way and to
    reference a hard-coded path on someone's C:\ drive.  I really really didn't want to do that b/c we create local dev databases all the time and not everyone has the same paths setup.  Also, our databases are deployed on our servers as well as remote-hosted-customer
    servers, and up until now, the database release has not needed file system access.  Even the CLR itself is created using assembly_bits, which is awesome.
    So I thought of something...
    What if I had a simple/temporary assembly, which I create from assembly_bits, use to import the public key from, through the create asymmetric key from assembly command, and then drop as if it never existed?
    Well...it works!
    Here is my current prototype of a pre-deployment script, which I'll go through and cleanup more, but thought I'd share.  I also want to document how I created the temporary assembly_bits in case anyone ever wants or needs to know, even though they really
    shouldn't.  But it should make them feel better.  Basically I just created did this to get them:
    1 - Created a C# Class Library project in the solution.
    2 - Added our .SNK to that project and removed the 'Class1.cs' that it created by default
    3 - Signed that class library with the .SNK
    4 - Added a project reference to that class library from the main database solution.
    5 - Generated a deployment script (but didn't run it) and grabbed the create assembly statement (copy/paste)
    6 - Deleted the temporary project
    7 - Pasted the code I had copy/pasted into the pre-deployment script
    Note that the objects do apparently need to go into MASTER, so at the end of the pre deployment script, I switch back to the automatic [$(DatabaseName)] after first having done USE master.
    Hope this helps someone.  Finally got it!
    BTW - The other way we almost used was to introduce a SqlCmdVariable of $StrongNameKeyFilePath but that would have been a hassle for people to set whenever they got a new machine, etc.
    Thanks,
    Ryan
    PRINT '**************************************************************************'
    PRINT 'Pre\SetupMasterDatabaseKeysAndLoginsIfNecessary.sql'
    PRINT '**************************************************************************'
    PRINT '************************************************************************************'
    PRINT 'If they do not already exist, create the database master key, as well as the asymmetric'
    PRINT 'key, from the Strong-Named File (.SNK) which signed the CLR assembly.  Finally, also'
    PRINT 'create a login from that asymmetric key and grant it the UNSAFE ASSEMBLY permission.'
    PRINT 'This is all necessary b/c the CLR currently has to be referenced for UNSAFE permissions'
    PRINT 'in order to access the TimeZoneInfo class.  This code and these objects can be removed'
    PRINT 'if the system is ever updated to use all UTC dates and no longer requires the TimeZoneInfo class.'
    PRINT '************************************************************************************'
    USE master
    PRINT N'Creating Temporary Assembly [Wits.Database.AsymmetricKeyInitialization]...'
    CREATE ASSEMBLY [Wits.Database.AsymmetricKeyInitialization]
        AUTHORIZATION [dbo]
        FROM 0x4D5BlahBlahBlah;
    IF NOT EXISTS (SELECT 1 FROM sys.symmetric_keys WHERE name LIKE '%DatabaseMasterKey%')
        BEGIN
            PRINT 'Creating Master Key...'
            CREATE MASTER KEY
                ENCRYPTION BY PASSWORD = 'I Removed This Part For This Post'
        END
    IF NOT EXISTS (SELECT 1 FROM sys.asymmetric_keys WHERE name = 'ClrExtensionAsymmetricKey')
        BEGIN
            PRINT 'Creating Asymmetric Key from strong-named file...'
            CREATE ASYMMETRIC KEY [ClrExtensionAsymmetricKey]
                FROM ASSEMBLY [Wits.Database.AsymmetricKeyInitialization]
        END
    IF NOT EXISTS (SELECT 1 FROM sys.server_principals WHERE type_desc = 'ASYMMETRIC_KEY_MAPPED_LOGIN' AND name = 'ClrExtensionLogin')
        BEGIN
            PRINT 'Creating Login from Asymmetric Key...'
            CREATE LOGIN [ClrExtensionLogin] FROM ASYMMETRIC KEY [ClrExtensionAsymmetricKey]
            PRINT 'Granting Permissions to Login created from Asymmetric Key...'
            GRANT UNSAFE ASSEMBLY TO ClrExtensionLogin
        END
    PRINT N'Dropping Temporary Assembly [Wits.Database.AsymmetricKeyInitialization]...'
    DROP ASSEMBLY [Wits.Database.AsymmetricKeyInitialization]
    USE [$(DatabaseName)]

  • Even spacing of objects? (justification)

    CS4
    Given 4 objects of the same size/shape aligned on one row. The left object is aligned to where is is suppose to be on the left and the right object is aligned to where it is suppose to be on its right edge.
    Now, how do I evenly space the other two objects between the left and right most objects?  None of the distribution choices seem to do what I need.
    TIA.

    In AI 12 (CS2), the Auto option in the dropdown field under Align palette | Distribute Spacing does what you want. I apologize if this works differently in AI 14 (CS4).

  • Losing field (in a Composit Object) in an HttpSession

    Hello. I am losing fields in a Composite object (object tree) that I am storing inside of an HttpSession. I'm developing with Tomcat and I saw that Tomcat implements the put/getAttribute methods with a Hashtable.
    So in my case, I store object A. in an HttpSession. For a user requests, I get A. and do some processing that sets object D. If I put that object back into the session and come back to it in a later request, object D has now been lost.
    A
    B
    C
    D
    Is there some contract that I'm missing here? I don't think these objects (A - D) need to be serialized. What am I missing here?
    Thanks in advance
    Tim

    It is very difficult to figure out what is going wrong from the info u have given. Examine your server log carefully if you can find any clue.
    You may also write a listener implementing HttpSessionAttributeListener and implement the methods
    attributeAdded(HttpSessionBindingEvent) ,attributeRemoved(HttpSessionBindingEvent) ,attributeReplaced(HttpSessionBindingEvent) to write some meaningful message in logs.
    Track the message generated by attributeRemoved() method in particular to find out when exactly is your object D going out of session. May be that will give u some clue. You can use HttpSessionBindingEvent.getName() and
    HttpSessionBindingEvent.getValue() methods to know about the object added/removed/reset in your session that has invoked the particular method in your listener.
    Also you will need to register the listener class in your web.xml for that to work properly.
    You will find more examples/help of this listener in net if u do a google search.

  • Composition widget boxes such as featured is it's copy SEOable?

    Do bots see the copy inside the various composition object widgets , such as featured news and blank?
    Can bots see them all even when out of our view?

    Yes! Here is a screenshot of the default "Featured News" widget rendered in Safari without CSS and JavaScript!
    For better SEO/accessibility remember to tag your titles as h2/h3/etc... and to add a Title/Alt attribute to your images (you can do all this things inside Muse).
    Francesco

  • Fireworks CS4 won't quit... Ever

    I just got CS4 and the only problem I'm running into so far is that FW CS4
    won't quit.
    Anyone have any ideas:
    [0x0-0x66066].com.macromedia.fireworks[658]: Adobe Fireworks
    CS4(658,0xa04cf720) malloc: *** error for object 0xffffffff: Non-aligned
    pointer being freed
    Jan 26 21:11:02 -Mac-Pro [0x0-0x66066].com.macromedia.fireworks[658]: ***
    set a breakpoint in malloc_error_break to debug
    Jan 26 21:11:09 -Mac-Pro Adobe Fireworks CS4[658]: ***
    _NSAutoreleaseNoPool(): Object 0x9214800 of class NSCFArray autoreleased
    with no pool in place - just leaking\nStack: (0x95d8e73f 0x95c9ae32
    0x2677011d 0x2680d121 0x2670a9dc 0x2670e71d 0x26919e76 0x26919f6f 0x26932220
    0x2671b098 0x2671b167 0x266e6230 0x27c63b37 0x25a06189 0x25a05cb6 0x2693b2b8
    0x269542f4 0x25a05912 0x25a03621 0x25a02a9e 0x2693b2b8 0x266cf500 0x266d0e7b
    0x266cc87f 0x266d2ba1 0x266ef2a6 0x2671012d 0x26612cd9 0x266133b0 0x26619209
    0x2664ba6f 0x2668976f 0x26780e98 0x267811ad 0x266418b6 0x2664a4f1 0x2677171f
    0x2676887a 0x2e41e09 0x2e40b67 0xa1a756 0xa1b3a1 0xa19654 0x787f88 0x21f3945
    0x784386 0x37be 0x36d9)
    Jan 26 21:11:17 -Mac-Pro Adobe Fireworks CS4[658]: Adobe Fireworks
    CS4(658,0xa04cf720) malloc: *** error for object 0x1395880: Non-aligned
    pointer being freed (2)\n*** set a breakpoint in malloc_error_break to debug

    Thank you. I thought I would start here. I'll repost!
    Cheers,
    ~Ben~

Maybe you are looking for

  • How do I stop the Welcome to Firefox tab from opening every time I open Firefox?

    I have read two ways to try and stop this in the help but they either did not apply or I could not do what they suggest. Every time I open Firefox of late the Welcome to fire fox tab opens along with my home page. It is only a small annoyance to turn

  • AIR 3.4 - Android - netstream freezes between 110 and 240 seconds

    Hi, On Android, netstream freezes between 110 and 240 seconds with videos in http://xxx/..../video.mp4 format. For more details, see bug: https://bugbase.adobe.com/index.cfm?event=bug&id=3323362 Each video freezes at the same time on 3 different devi

  • IE8 and :root

    Guys: I appears that IE8 does not correctly understand the CSS3 ":root" pseudo-class, which is a shame. http://www.w3.org/TR/css3-selectors/#root-pseudo This means that the lovely and elegant rule - :root { overflow-y:scroll; } which forces a vertica

  • Product Costing Customizing documentation

    MODERATOR:  All points have been UNASSIGNED and the thread LOCKED.  Do not share email addresses on these forums.  If you have some information, please consider posting it to the [Wiki|https://wiki.sdn.sap.com/wiki/display/ERPFI/Home] rather than sha

  • Protect the adf url from anonymous users

    Hi All, How can i protect my adf application url from anonymous users?Please give me your valuable suggestions.