Set frame max size

hey, is there a way to prevent a JFrame from maximising beyond a certain size? I have a JFrame that is 800 by 400, and i dont want it to be smaller than 700 by 400 and larger than 900 by 400.
thanks
Pedge
Prog2(){
final Demo demo = new Demo();
DemoControls demoC;
demoC = new DemoControls(demo);
JFrame f = new JFrame("prog 2");
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
public void windowDeiconified(WindowEvent e) { demo.start(); }
public void windowIconified(WindowEvent e) { demo.stop(); }});
f.getContentPane().add("Center", demo);
f.getContentPane().add("East", demoC);
f.pack();
f.setSize(new Dimension(800,400));
f.show();
demo.start();}

Hi,
In my programs I use the method update(Graphics g) from JFrame to keep the size of the window within boundaries.
This method is called each time when the size of the window is changed (and maybe also in other situations), but the way it works can be compared with paint (Graphics g) in applets.
Just try to compile the following code and see how it works.
(I know that it is not the best way to wish for, but this is one way of wich I know that it works)
Good luck,
Willy
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
class testFrame extends JFrame implements WindowListener {
// Constructor:
public testFrame () {
super ("Keeping the size within limits !!!");
this.setSize (new Dimension (700,400));
this.addWindowListener (this);
this.show ();
} // End of constructor
public void update (Graphics g) {
super.update (g);
Dimension oDim = this.getSize ();
double dWidth = oDim.getWidth();
double dHeight = oDim.getHeight();
if (dWidth > 900)
dWidth = 900;
if (dWidth < 700)
dWidth = 700;
if (dHeight != 400)
dHeight = 400;
oDim.setSize (dWidth,dHeight);
this.setSize (oDim);
} // End of method update
public static void main (String [] args) {
testFrame oFrame = new testFrame ();
} // End of method main
// Implementing methods :
public void windowClosing (WindowEvent e) {System.exit(1);}
public void windowDeiconified (WindowEvent e) {}
public void windowActivated (WindowEvent e) {}
public void windowOpened (WindowEvent e) {}
public void windowIconified (WindowEvent e) {}
public void windowClosed (WindowEvent e) {}
public void windowDeactivated (WindowEvent e) {}
} // End class testFrame

Similar Messages

  • Desperate here- Please help!! Setting a max size on the Photo in a Gallery

    I have a client who has 1,000s of picturea there are MANY of their pictures which are HUGE. So the thumbnail is fine I can alter those ratios, but is there a way to alter the size the picture can be when clicked on and it enters the slideshow/gallery mode? Is there a way to set a max size and make that alteration all at once- instead of resizing every picture? If so, how?
    Also, is there a way to take the PREVIOUS and NEXT buttons off the module under the thumbnail?
    Thanks!

    Hi there,
    Editing the CSS to scale the large images is a real bad idea, especially huge ones as being indicated by you both. These images are large and larger file size and will take a long time to download, especially on mobiles. Changing the CSS so they appear smaller does not change that at all.
    You need upload images that are web optimised and scaled correctly first, this is really a good must for proper management.
    In terms of the thumbnail images you need to just modify the module paramaters to get the size and scale you want so this is done server side and the images served already scaled.

  • Possible to set min/max size to a resizable Stage? If so, how?

    Is it possible to set a minimum and maximum size to a resizable Stage? If so, how would this be done? Do I use some kind of onResize event handler or is there some other way?
    Here is a sample code where I have a 500 x 500 px image in a 300 x 300 px scrollable scene that is in a resizable stage. Right now, I am able to resize the stage to any size, but I would like to limit the resizable minimum width and height to 100 x 100 px and limit the resizable maximum width and height to 600 x 600 px.
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.control.ScrollView;
    import javafx.scene.control.ScrollBarPolicy;
    import javafx.scene.image.ImageView;
    import javafx.scene.image.Image;
    var scene: Scene;
    Stage {
        resizable: true
        scene: scene = Scene {
            width: 300
            height: 300
            content: ScrollView {
                hbarPolicy: ScrollBarPolicy.ALWAYS
                vbarPolicy: ScrollBarPolicy.ALWAYS
                width: bind scene.width
                height: bind scene.height
                node: ImageView {
                    image: Image { url: "{__DIR__}roses.jpg"}
    }

    Hi, I don't understand how WidgetFX is going to allow me to set min/max size to a resizable Stage. After all, it is a desktop widget platform and I'm not trying to build a desktop widget. None of the demos I've tried use a decorated Stage with platform decorations that can be used to drag and resize the Stage.
    I'm just trying to limit the min/max size of a resizable Stage. If you think WidgetFX will address my problem, I think a better solution is the JavaFX Stage Controller class I found available at http://code.google.com/p/memefx/. However, the JavaFX Stage Controller class still doesn't address the problem I have because it doesn't stop the user from dragging the Stage beyond the size restricted by the min/max height. It only reverts the Stage to the max size after the user already dragged and resized the Stage beyond the max resizable width/height.

  • Set window max size

    Hi all
    I have a swing applet which uses aprox 1/4 of my screen. I want to stop the user being able to stretch/ minimise the window making my applet look rubbish! Any idea how i do this? Im assuming it is the window and not the frame i need to stop moving.
    Help please!
    Thanks in advance.
    If i have cross posted i apologies, i put thread in wrong area and dont know how to remove

    I m not sure i got your question right, but you can probably set the
    frame.setResizable(false);or
    dialog.setResizable(false);depending on what you are using. On the other hand, your layout should be handling the resize behavior. in the long run, always better to design your layout correctly

  • Can you set a max size for a folder on a file server

    I've got a G5 Xserve that I'm using as a file server running 10.3.9. I need more space on my array so I bought bigger drives and will move the data to the new, larger array.
    For the health of my drives, I want my array to maintain at least 10% free space so I would like for the people using the shares to only see 90% of the larger space. (I don't want to have to be the 'drive space' policeman 6 months from now when the RAID fills up again)
    I know I could create 2 partitions in diskutil but I'd like something more dynamic.
    Ideally I'd like to put my shared folders inside of a main folder and tell Server to only display 90% of the size of the partition when a folder from the partition is mounted remotely. That way people won't know there is a quota which keeps them from trying to copy data into a share that shows 10% free space.
    The shares are used by both macs and PCs so I'd rather not go with a solution based upon network protocol.
    Many Thanks,
    Paul
    G5 Xserve   Mac OS X (10.3.9)  

    There's no way I'm aware of to artificially display a different capacity/available space than what's actually there. If it's a 1TB volume, it's a 1TB volume and the OS isn't going to report that as 900GB.
    The only other solutions I can think of is to either enable quotas which will let you restrict the amount of disk space any user can consume, or attach a folder action to the volume where the script automatically checks the volume size whenever new files are added and takes action at the appropriate time (you need to define what that action is, though).

  • Max Size for a message thru SAP PI 7.0 SPS13

    Hi,
         I have a problem with a very large message. The scenario is a JDBC -> SAP PI -> ABAP Proxy. I'm getting this error:
    ErrorTransmitting the message to endpoint http://<server>:8000/sap/xi/engine?type=entry
    using connection JDBC_http://sap.com/xi/XI/System failed, due to:
    com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Error writing to server.
         We try to solves it changing the EO_MSG_SIZE_LIMIT parameter in SXMB_ADM but it doesn't help us at all.
         How can we set the max size for a message that going thru SAP PI.
         We have SAP PI 7.0 SPS 13.

    HI Luis
    Whats the message size and whats the value you have given in EO_MSG_SIZE_LIMIT. After saving this parameter did you verified at RWB ->RWB->Component Monitoring->Integration Engine->
    Settings->Tuning
    Add one more EO_INBOUND_TO_OUTBOUND this will allow data not to be placed on Outbound queue and bring to inbound queue. This is having advantage that to process high volume message you will get better performance but disadvantage is when there is no receiver inbound queue is blocked.
    It can be a issue related to connection. Please check with the RFC you have for proxy and IE RFC's
    Thanks
    Gaurav
    Edited by: Gaurav Bhargava on Nov 22, 2008 11:44 PM

  • Sga max size is not changed.

    We use Oracle 11gr2 on win2008R2.
    Our member said that he set sga max size by
    alter system set sga_max_size scope=spfile; max size to 6GB.
    And he restared that OS and DB instance , then
    show parameters sga_max_size was 7.6GB.
    we use  dynamic SGA and automatic memory management.
    Is it natural things ? If so, I would like to explaint about to our customer.
    Why the show parameters sga_max_size was 7.6GB ?

    DUPLICATE POST. please continue with our original post. Please mark this question answered and check the following link:
    sga max size is different

  • Sga max size is different

    We use Oracle 11gr2 on win2008R2.
    Our member set sga max size by
    alter system set sga_max_size scope=spfile; max size to 6GB.
    And we restared that OS and DB instance , then
    show parameters sga_max_size was 7.6GB
    Why is that ?

    If MEMORY_TARGET is set to a non-zero value:
    If SGA_TARGET and PGA_AGGREGATE_TARGET are set, they will be considered the minimum values for the sizes of SGA and the PGA respectively. MEMORY_TARGET values can range from SGA_TARGET + PGA_AGGREGATE_TARGET to MEMORY_MAX_TARGET.
    Now check if your memory_target is set.
    Read this metalink note as well:
    Automatic Memory Management (AMM) on 11g (Doc ID 443746.1)

  • How do I set a fixed size for a window (frame) :P

    hello!
    Was wondering if I can set fix dimensions (size) for a window(frame) in Java.
    Background: I have a menu and when I click on one of the options a window opens but I hate the fact that I can enlarge it...wish it would be fixed sized and have scroll instead... :P
    any ideas?
    many thanks!
    Cristina

    sorry for not using the swing forum but i considered java programming forum as more or less enclosing all problems Do you understand how to use forums? First you should be searching the forums to see if you questions has been asked and answered before. (Very few questions posted in the forums are original). It makes sense to search the forum where the questions should have been posted in the first place.
    For example, if you had searched the Swing forum using "fixed size jframe" you would have found this posting at the top of the search results:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=712407
    So you would have had your question answered in less than a minute and we wouldn't have wasted time answering a question that has already been answered.
    A win-win situtation for everybody.

  • Media Encoder (AMC) F4V - none of the video setting effect file size????

    When I used to use sorenson squeeze, mov  i could get a web flick down to 15 MB by reducing frame rate or size.
    when using AMC - F4V - no matter what size or settings the same movie satays at about 34MB (with olny slight varistions if i tweek audio)
    How do i get the file size smaller if none of the video setting effect file size????

    In the limited amount of comparison testing I've done, I've found that 2-pass VBR files are consistently smaller than CBR files, all other things being equal. They're not always a great deal smaller, but they've never exceeded the size of the CBR files, and this goes for any type of encoding I've done, whether it's MPEG-2 for a DVD, or a web format like WMV, FLV (VP6), or H.264. This seems to be true even when the target and the maximum bitrate for the 2-pass VBR files match the bitrate "quantity" of the target bitrate of the 1-pass CBR files, and I've noticed this in any encoding application I use, whether it's AME, Sorenson Squeeze, or TMPGEnc Xpress. When analyzing my VBR-encoded files using an application such as MediaInfo, the average bitrate that is reported is never even close to my max bitrate, and is usually well under my target bitrate.
    I see two reasons for this:
    If you're encoding with CBR and set your bitrate at 1000kbps, for instance, the encoder will simply allocate 1000kbps of bandwidth (divided by the frame rate) to each and every frame of video, regardless of how complex or simple each frame is. Each frame will be compressed to as near 1000kbps (divided by the framerate) as possible. Using CBR, you can more or less estimate the end file size by multiplying the bitrate by the duration in seconds. Think of it as filling a series of water glasses: with CBR, you fill each glass full, regardless of how much each individual actually wants to drink.
    If you're encoding with 2-pass VBR and set your maximum bitrate to 1000kbps and (for argument's sake) your target bitrate to 1000kbps as well, the encoder will use the first pass to figure out how much available bandwidth is needed at each individual point of time, and that writes that to a log file that the second pass of the encoder then uses to properly allocate those available bits to the frames that need them the most. If a particular passage of the video can be encoded at a lower bitrate, and still maintain a prescribed level of visual quality, the encoder will simply put the squeeze on a little more. Back to our water glass analogy from above, this is the equivalent of filling each water glass with only as much water as each individual wants.
    For example, using the max/target bitrate set above, a low-motion/low-complexity passage of video may be able to be encoded at only 500kbps and yet maintain the visual quality of 1000kbps. This results in a fewer bytes needed to encode that particular duration of the video, and usually there are multiple sections in a video that can be treated as such. This has a cumulative effect and subsequently results in a final encoded video that has a smaller file size than it would had it be encoded at the same bitrate, but with CBR encoding.
    I'm not a software engineer or mathemagician, so I can't back all this up with empirical evidence, but in real-world practice, these have been my observations. Long story short: I always use 2-pass VBR for web-distributed encodes, and enjoy both smaller and better-looking files, at the expense of a coffee break.

  • I want to set a maximum size for pictures when FF shows websites. How can i do that? NO I DONT MEAN "HOW TO ZOOM".

    I have FF 34 but this problem has been there for a lot of earlier versions. On many webpages there are pictures that cover my whole screen, and I want to set maximum size for showing images on webpages.
    I ONLY wanr to change the maximum size of the images, AND IAM NOT asking about how to zoom the webpage.

    Do you want to hide large images or merely make them smaller by setting a max-width and max-height?
    You would probably have to use JavaScript (bookmarklet) to achieve this reliably.
    There are bookmarklets to make large images fit in the window to avoid a horizontal scroll bar
    You can try this code in the <b>userContent.css</b> file (adjust the max-width accordingly).
    *http://kb.mozillazine.org/userContent.css
    <pre><nowiki>img { max-width: 1024px !important; height: auto !important; }</nowiki></pre>
    The customization files userChrome.css (user interface) and userContent.css (websites) are located in the <b>chrome</b> folder in the Firefox profile folder.
    *http://kb.mozillazine.org/Editing_configuration
    *Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
    *Use a plain text editor like Notepad to create a (new) userContent.css file in the chrome folder (file name is case sensitive)
    *Paste the code in the userContent.css file in the editor window
    *Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userContent.css.<br>Otherwise Windows may add a hidden .txt file extension and you end up with a not working userContent.css.txt file

  • Data size bigger than max size for this type - DB Control

    All,
    We are using a Java Control to fetch and store data
    - it fetches data from a webservice through a webservice control
    - it stores data in to database using a database control (stores the data as BLOB)
    Here currently we facing an error - weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
    The data is definitely not overshooting the max capacity of BLOB which is 4 GB. Initially this process was overshooting the transaction time-out limit of 300 sec but currently this is well within the transaction time-out limit and error happens soon after the webservice returns the data.
    a. Are there any known issues with using BLOB's with database controls ?
    b. what are the options - if we face this error ?
    weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:454)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:248)
         at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:85)
         at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:224)
         at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(SLSBContainerBean.java:103)
         at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(StatelessContainer_ly05hg_ELOImpl.java:99)
         at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(Ljava.lang.Object;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(GenericStatelessSLSBContAdpt.java:62)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:153)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
         at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
         at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:46)
         at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
         at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Ljava.lang.Object;(ServiceHandleImpl.java:436)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(Lcom.bea.wlw.runtime.core.request.ExecRequest;)Ljava.lang.Object;(WlwProxyImpl.java:326)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwProxyImpl.java:315)
         at $Proxy12.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(Unknown Source)
         at portlets.PeopleStaffing.StaffingController.begin()Lcom.bea.wlw.netui.pageflow.Forward;(StaffingController.jpf:356)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(Ljava.lang.reflect.Method;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1519)
    Caused by: java.sql.SQLException: Data size bigger than max size for this type: 4516
         at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava.lang.String;Ljava.lang.String;I)V(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava.lang.Object;)V(DBError.java:179)
         at oracle.jdbc.ttc7.TTCItem.setArrayData(Z[B)V(TTCItem.java:95)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(III[B)Z(DBDataSetImpl.java:2413)
         at oracle.jdbc.driver.OraclePreparedStatement.setItem(II[B)V(OraclePreparedStatement.java:1166)
         at oracle.jdbc.driver.OraclePreparedStatement.setBytes(I[B)V(OraclePreparedStatement.java:2208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;II)V(OraclePreparedStatement.java:3002)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;I)V(OraclePreparedStatement.java:3107)
         at weblogic.jdbc.wrapper.PreparedStatement.setObject(ILjava.lang.Object;I)V(PreparedStatement.java:244)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(Ljava.sql.PreparedStatement;ILjava.lang.Object;I)V(DatabaseControlImpl.jcs:1862)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(Ljava.lang.reflect.Method;[Ljava.lang.Object;ZLjava.lang.String;)Ljava.sql.PreparedStatement;(DatabaseControlImpl.jcs:1708)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(DatabaseControlImpl.jcs:2567)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:388)
         at $Proxy13.insertObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManagerImpl.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(PeopleDatabaseManagerImpl.jcs:263)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Optimized Method)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:381)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sudeep SV wrote:
    All,
    We are using a Java Control to fetch and store data
    - it fetches data from a webservice through a webservice control
    - it stores data in to database using a database control (stores the data as BLOB)
    Here currently we facing an error - weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
    The data is definitely not overshooting the max capacity of BLOB which is 4 GB. Initially this process was overshooting the transaction time-out limit of 300 sec but currently this is well within the transaction time-out limit and error happens soon after the webservice returns the data.
    a. Are there any known issues with using BLOB's with database controls ?
    b. what are the options - if we face this error ?
    Hi Sudeep. The problem is that WLW is trying to set the datum as a byte array
    and the oracle driver won't take a byte array that big. Please check whether
    WebLogic Workshop has any explicit instructions for BLOB data. Otherwise, do
    contact official BEA support for your WebLogic WorkShop issue.
    Joe
    weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:454)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:248)
         at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:85)
         at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:224)
         at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(SLSBContainerBean.java:103)
         at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(StatelessContainer_ly05hg_ELOImpl.java:99)
         at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(Ljava.lang.Object;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(GenericStatelessSLSBContAdpt.java:62)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:153)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
         at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
         at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:46)
         at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
         at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Ljava.lang.Object;(ServiceHandleImpl.java:436)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(Lcom.bea.wlw.runtime.core.request.ExecRequest;)Ljava.lang.Object;(WlwProxyImpl.java:326)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwProxyImpl.java:315)
         at $Proxy12.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(Unknown Source)
         at portlets.PeopleStaffing.StaffingController.begin()Lcom.bea.wlw.netui.pageflow.Forward;(StaffingController.jpf:356)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(Ljava.lang.reflect.Method;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1519)
    Caused by: java.sql.SQLException: Data size bigger than max size for this type: 4516
         at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava.lang.String;Ljava.lang.String;I)V(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava.lang.Object;)V(DBError.java:179)
         at oracle.jdbc.ttc7.TTCItem.setArrayData(Z[B)V(TTCItem.java:95)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(III[B)Z(DBDataSetImpl.java:2413)
         at oracle.jdbc.driver.OraclePreparedStatement.setItem(II[B)V(OraclePreparedStatement.java:1166)
         at oracle.jdbc.driver.OraclePreparedStatement.setBytes(I[B)V(OraclePreparedStatement.java:2208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;II)V(OraclePreparedStatement.java:3002)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;I)V(OraclePreparedStatement.java:3107)
         at weblogic.jdbc.wrapper.PreparedStatement.setObject(ILjava.lang.Object;I)V(PreparedStatement.java:244)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(Ljava.sql.PreparedStatement;ILjava.lang.Object;I)V(DatabaseControlImpl.jcs:1862)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(Ljava.lang.reflect.Method;[Ljava.lang.Object;ZLjava.lang.String;)Ljava.sql.PreparedStatement;(DatabaseControlImpl.jcs:1708)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(DatabaseControlImpl.jcs:2567)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:388)
         at $Proxy13.insertObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManagerImpl.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(PeopleDatabaseManagerImpl.jcs:263)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Optimized Method)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:381)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem in Rolling to new a log file only when it exceeds max size (Log4net library)

    Hello,
    I am using log4net library to create log files.
    My requirement is roll to a new log file with name appended with timestamp only when file size exceeds max size (file name ex: log_2014_12_11_12:34:45 etc).
    My config is as follow
     <appender name="LogFileAppender"
                          type="log4net.Appender.RollingFileAppender" >
            <param name="File" value="logging\log.txt" />
            <param name="AppendToFile" value="true" />
            <rollingStyle value="Size" />
            <maxSizeRollBackups value="2" />
            <maximumFileSize value="2MB" />
            <staticLogFileName value="true" />
            <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
            <layout type="log4net.Layout.PatternLayout">
              <param name="ConversionPattern"
                   value="%-5p%d{yyyy-MM-dd hh:mm:ss} – %m%n" />
              <conversionPattern
                   value="%newline%newline%date %newline%logger 
                           [%property{NDC}] %newline>> %message%newline" />
            </layout>
          </appender>
    Issue is date time is not appending to file name. 
    But if i set "Rolling style" as "Date or composite", file name gets appended with timestamp, but new file gets created before reaching max file size.(Because file gets created  whenever date time changes, which i dont want) .
    Please help me in solving this issue?
    Thanks

    Hello,
    I'd ask the logfornet people: http://logging.apache.org/log4net/
    Or search on codeproject - there may be some tutorials that would help you.
    http://www.codeproject.com/Articles/140911/log-net-Tutorial
    http://www.codeproject.com/Articles/14819/How-to-use-log-net
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Exchange 2013 with Outlook 2013 - Not getting pop-up or mail tips for attachments exceeding max size

    Our environment is Exchange Server 2013 CU3 and Outlook 2013 in cached mode. We have a transport rule that sets the max attachment size to 20 mb.
    If someone sends an attachment larger than 20 mb they receive an NDR letting them know the message wasn't delivered because it exceeded the max attachment size. We would like for the user to be prevented from sending the message at all or to at least
    get a mail tip before they try to send the message. The Outlook pop-up message that says "The file you're attaching is bigger than the server allows. Try putting the file in a shared location ..." isn't being generated for us. Not sure if that's
    because we're running Exchange or not. If that pop-up isn't going to work it would be nice if the user could at least get a mail-tip warning them that the attachment exceeds the limit. But it doesn't look likes there's a mail-tip for attachment size, only
    for message size. And, I've found that the message size mail-tip only works if the limit is set on the user. It doesn't seem to work if the limit is set via a transport rule.
    Has anyone else gotten Outlook to present the pop-up or a mail-tip when exceeding attachment size? Any help you can offer would be greatly appreciated.

    Thanks but I performed all of those trouble shooting prior to posting to the forum. But, I have found the answer!
    After referring to this article;
    http://technet.microsoft.com/en-us/library/bb124345(v=exchg.150).aspx
    I removed the 10mb default limits from the organization config and chose to set the attachment and message size limits in our environment via transport
    rules instead. That is the only way you can actually set an attachment size limit.
    I had read this article several times searching for an answer;
    http://support.microsoft.com/kb/2813269#appliesto
    The key is here;
    "If you are using an Exchange Server account, the 20-MB attachment
    limit for Internet email accounts is not used by Outlook 2013. Instead, Outlook uses the limit that is configured on your Exchange server. To modify the setting that is used to control the size of a message that is sent through an
    Exchange Server account, follow these steps."
    The steps that follow are for Exchange 2010 but they show setting organization limits not server limits. And note that it
    says the size of a message, not the size of an attachment. Since mail-tips for message size are not displayed when the limit is set via the transport rules I thought it
    was possible that the same inconsistency might apply to the attachment pop-up warning. I set the organization limits and voila! The pop-up now displays when an attachment that exceeds the message size limit is added to a message.
    This is exactly what I wanted. Now users won't fill up their sent items trying to send large attachments that just bounce anyway.
    It would be wonderful if Microsoft would provide information about what features of Outlook are affected when you apply message size limits at the
    various levels. 

  • Hi, I am using Indesign CS6, How to set the page size in Inches.

    Hi, I am using Indesign CS6, How to set the page size in Inches.

    All fields in InDesign can be entered in any measurement system. So, if you want to make an 8"x10" document and go to File>New Document and the window looks like this:
    …you can type either 8 in or 8" into the Width field like this:
    …and when you move to the next field, it will convert the eight inches into the equivalent number in the unit of measure that it is using at the moment, like this:
    … (203.2 milimeters is the same as 8 inches). You can also enter a different measurement unit into other fields once the file is created, such as the width or height of a frame, or the position of an object in the X and Y coordinates.
    If you would rather just work in inches instead of having to type the inches mark or abbreviation, go to InDesign>Preferences>General and select the Units & Increments tab. There you will see Ruler Units for Horizontal and Vertical at the top of the window. Set them to Inches and all of the fields will display in inches. If you do that to an open document, you will change the unit of measure for that document. If you do it while no documents are open, it will change the unit of measure for any new documents you create. To change the unit of measure for existing documents, you will have to open each and make the change.

Maybe you are looking for