Search Results

Search found 6533 results on 262 pages for 'resource leak'.

Page 1/262 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • SQL SERVER – Simple Example to Configure Resource Governor – Introduction to Resource Governor

    - by pinaldave
    Let us jump right away with question and answer mode. What is resource governor? Resource Governor is a feature which can manage SQL Server Workload and System Resource Consumption. We can limit the amount of CPU and memory consumption by limiting /governing /throttling on the SQL Server. Why is resource governor required? If there are different workloads running on SQL Server and each of the workload needs different resources or when workloads are competing for resources with each other and affecting the performance of the whole server resource governor is a very important task. What will be the real world example of need of resource governor? Here are two simple scenarios where the resource governor can be very useful. Scenario 1: A server which is running OLTP workload and various resource intensive reports on the same server. The ideal situation is where there are two servers which are data synced with each other and one server runs OLTP transactions and the second server runs all the resource intensive reports. However, not everybody has the luxury to set up this kind of environment. In case of the situation where reports and OLTP transactions are running on the same server, limiting the resources to the reporting workload it can be ensured that OTLP’s critical transaction is not throttled. Scenario 2: There are two DBAs in one organization. One DBA A runs critical queries for business and another DBA B is doing maintenance of the database. At any point in time the DBA A’s work should not be affected but at the same time DBA B should be allowed to work as well. The ideal situation is that when DBA B starts working he get some resources but he can’t get more than defined resources. Does SQL Server have any default resource governor component? Yes, SQL Server have two by default created resource governor component. 1) Internal –This is used by database engine exclusives and user have no control. 2) Default – This is used by all the workloads which are not assigned to any other group. What are the major components of the resource governor? Resource Pools Workload Groups Classification In simple words here is what the process of resource governor is. Create resource pool Create a workload group Create classification function based on the criteria specified Enable Resource Governor with classification function Let me further explain you the same with graphical image. Is it possible to configure resource governor with T-SQL? Yes, here is the code for it with explanation in between. Step 0: Here we are assuming that there are separate login accounts for Reporting server and OLTP server. /*----------------------------------------------- Step 0: (Optional and for Demo Purpose) Create Two User Logins 1) ReportUser, 2) PrimaryUser Use ReportUser login for Reports workload Use PrimaryUser login for OLTP workload -----------------------------------------------*/ Step 1: Creating Resource Pool We are creating two resource pools. 1) Report Server and 2) Primary OLTP Server. We are giving only a few resources to the Report Server Pool as described in the scenario 1 the other server is mission critical and not the report server. ----------------------------------------------- -- Step 1: Create Resource Pool ----------------------------------------------- -- Creating Resource Pool for Report Server CREATE RESOURCE POOL ReportServerPool WITH ( MIN_CPU_PERCENT=0, MAX_CPU_PERCENT=30, MIN_MEMORY_PERCENT=0, MAX_MEMORY_PERCENT=30) GO -- Creating Resource Pool for OLTP Primary Server CREATE RESOURCE POOL PrimaryServerPool WITH ( MIN_CPU_PERCENT=50, MAX_CPU_PERCENT=100, MIN_MEMORY_PERCENT=50, MAX_MEMORY_PERCENT=100) GO Step 2: Creating Workload Group We are creating two workloads each mapping to each of the resource pool which we have just created. ----------------------------------------------- -- Step 2: Create Workload Group ----------------------------------------------- -- Creating Workload Group for Report Server CREATE WORKLOAD GROUP ReportServerGroup USING ReportServerPool ; GO -- Creating Workload Group for OLTP Primary Server CREATE WORKLOAD GROUP PrimaryServerGroup USING PrimaryServerPool ; GO Step 3: Creating user defiled function which routes the workload to the appropriate workload group. In this example we are checking SUSER_NAME() and making the decision of Workgroup selection. We can use other functions such as HOST_NAME(), APP_NAME(), IS_MEMBER() etc. ----------------------------------------------- -- Step 3: Create UDF to Route Workload Group ----------------------------------------------- CREATE FUNCTION dbo.UDFClassifier() RETURNS SYSNAME WITH SCHEMABINDING AS BEGIN DECLARE @WorkloadGroup AS SYSNAME IF(SUSER_NAME() = 'ReportUser') SET @WorkloadGroup = 'ReportServerGroup' ELSE IF (SUSER_NAME() = 'PrimaryServerPool') SET @WorkloadGroup = 'PrimaryServerGroup' ELSE SET @WorkloadGroup = 'default' RETURN @WorkloadGroup END GO Step 4: In this final step we enable the resource governor with the classifier function created in earlier step 3. ----------------------------------------------- -- Step 4: Enable Resource Governer -- with UDFClassifier ----------------------------------------------- ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION=dbo.UDFClassifier); GO ALTER RESOURCE GOVERNOR RECONFIGURE GO Step 5: If you are following this demo and want to clean up your example, you should run following script. Running them will disable your resource governor as well delete all the objects created so far. ----------------------------------------------- -- Step 5: Clean Up -- Run only if you want to clean up everything ----------------------------------------------- ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = NULL) GO ALTER RESOURCE GOVERNOR DISABLE GO DROP FUNCTION dbo.UDFClassifier GO DROP WORKLOAD GROUP ReportServerGroup GO DROP WORKLOAD GROUP PrimaryServerGroup GO DROP RESOURCE POOL ReportServerPool GO DROP RESOURCE POOL PrimaryServerPool GO ALTER RESOURCE GOVERNOR RECONFIGURE GO I hope this introductory example give enough light on the subject of Resource Governor. In future posts we will take this same example and learn a few more details. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: Resource Governor

    Read the article

  • Resource management question. Resource containing resource

    - by bobenko
    I have resource manager handling as usual resource loading, unloading etc. With resources such an images, mesh no problem. But what to do when I have resource containing other resource (for example spriteFont contains reference to sprite and letters description). Should that sprite be added to resource manager? Or my spriteFont must be the only owner of that resource? Any thoughts on this. Have you faced with such problem? Thanks in advance.

    Read the article

  • URIs and Resource vs Resource representation

    - by bckpwrld
    URL is an URI which identifies a resource by location. Resource representation is a view of resource's state. This view is encoded in one or more transferable formats, such as XHTML, Atom, XML, MP3 ... URIs associate resource representations with their resources a) So I assume URI identifies a resource and not resource representation? b) I've read that relationship between an URI and resource representation is one to many. Assuming we're talking about URL, how can a single URL address more than one resource representation? thank you

    Read the article

  • Explicit resource loading in Ogre (Mogre)

    - by sebf
    I am just starting to learn Mogre and what I would like to do is to be able to load resources 'explicitly' (i.e. I just provide an absolute path instead of using a resource group tied to a directory). This is very different to manually loading resources, which I believe in Ogre has a very specific meaning, to build up the object using Ogres methods. I want to use Ogres resource management system/resource loading code, but to have finer control over which files are loaded and in what groups they are. I remember reading how to do this but cannot find the page again; I think its possible to do something like: Declare a resource group Declare the resource(s) (this is when the actual resource file name is provided) Initialise the resource group to actually load the resource(s) Is this the correct procedure? If so, is there any example code showing how to do this?

    Read the article

  • ASP.NET Localization: Enabling resource expressions with an external resource assembly

    - by Brian Schroer
    I have several related projects that need the same localized text, so my global resources files are in a shared assembly that’s referenced by each of those projects. It took an embarrassingly long time to figure out how to have my .resx files generate “public” properties instead of “internal” so I could have a shared resources assembly (apparently it was pretty tricky pre-VS2008, and my “googling” bogged me down some out-of-date instructions). It’s easy though – Just change the “Custom Tool” to “PublicResXFileCodeGenerator”:    …which can be done via the “Access Modifier” dropdown of the resource file designer window:   A reference to my shared resources DLL gives me the ability to use the resources in code, but by default, the ASP.NET resource expression syntax: <asp:Button ID="BeerButton" runat="server" Text="<%$ Resources:MyResources, Beer %>" />   …assumes that your resources are in your web site project.   To make resource expressions work with my shared resources assembly, I added two classes to the resources assembly: 1) a custom IResourceProvider implementation:   1: using System; 2: using System.Web.Compilation; 3: using System.Globalization; 4:   5: namespace DuffBeer 6: { 7: public class CustomResourceProvider : IResourceProvider 8: { 9: public object GetObject(string resourceKey, CultureInfo culture) 10: { 11: return MyResources.ResourceManager.GetObject(resourceKey, culture); 12: } 13:   14: public System.Resources.IResourceReader ResourceReader 15: { 16: get { throw new NotSupportedException(); } 17: } 18: } 19: }   2) and a custom factory class inheriting from the ResourceProviderFactory base class:   1: using System; 2: using System.Web.Compilation; 3:   4: namespace DuffBeer 5: { 6: public class CustomResourceProviderFactory : ResourceProviderFactory 7: { 8: public override IResourceProvider CreateGlobalResourceProvider(string classKey) 9: { 10: return new CustomResourceProvider(); 11: } 12:   13: public override IResourceProvider CreateLocalResourceProvider(string virtualPath) 14: { 15: throw new NotSupportedException(String.Format( 16: "{0} does not support local resources.", 17: this.GetType().Name)); 18: } 19: } 20: }   In the “system.web / globalization” section of my web.config file, I point the “resourceProviderFactoryType" property to my custom factory:   <system.web> <globalization culture="auto:en-US" uiCulture="auto:en-US" resourceProviderFactoryType="DuffBeer.CustomResourceProviderFactory, DuffBeer" />   This simple approach met my needs for these projects , but if you want to create reusable resource provider and factory classes that allow you to specify the assembly in the resource expression, the instructions are here.

    Read the article

  • Free RAM disappears - Memory leak?

    - by Izzy
    On a fresh started system, free reports about 1.5G used RAM (8G RAM alltogether, Ubuntu 12.04 with lightdm and plasma desktop, one konsole window started). Having the apps running I use, it still consumes not more than 2G. However, having the system running for a couple of days, more and more of my free RAM disappears -- without showing up in the list of used apps: while smem --pie=name reports less than 20% used (and 80% being available), everything else says differently. free -m for example reports on about day 7: total used free shared buffers cached Mem: 7459 7013 446 0 178 997 -/+ buffers/cache: 5836 1623 Swap: 9536 296 9240 (so you can see, it's not the buffers or the cache). Today this finally ended with the system crashing completely: the windows manager being gone, apps "hanging in the air" (frameless) -- and a popup notifying me about "too many open files". Syslog reports: kernel: [856738.020829] VFS: file-max limit 752838 reached So I closed those applications I was able to close, and killed X using Ctrl-Alt-backspace. X tried to come up again after that with failsafeX, but was unable to do so as it could no longer detect its configuration. So I switched to a console using Ctrl-Alt-F2, captured all information I could think of (vmstat, free, smem, proc/meminfo, lsof, ps aux), and finally rebooted. X again came up with failsafeX; this time I told it to "recover from my backed-up configuration", then switched to a console and successfully used startx to bring up the graphical environment. I have no real clue to what is causing this issue -- though it must have to do either with X itself, or with some user processes running on X -- as after killing X, free -m output looked like this: total used free shared buffers cached Mem: 7459 2677 4781 0 62 419 -/+ buffers/cache: 2195 5263 Swap: 9536 59 9477 (~3.5GB being freed) -- to compare with the output after a fresh start: total used free shared buffers cached Mem: 7459 1483 5975 0 63 730 -/+ buffers/cache: 689 6769 Swap: 9536 0 9536 Two more helpful outputs are provided by memstat -u. Shortly before the crash: User Count Swap USS PSS RSS mail 1 0 200 207 616 whoopsie 1 764 740 817 2300 colord 1 3200 836 894 2156 root 62 70404 352996 382260 569920 izzy 80 177508 1465416 1519266 1851840 After having X killed: User Count Swap USS PSS RSS mail 1 0 184 188 356 izzy 1 1400 708 739 1080 whoopsie 1 848 668 826 1772 colord 1 3204 804 888 1728 root 62 54876 131708 149950 267860 And after a restart, back in X: User Count Swap USS PSS RSS mail 1 0 212 217 628 whoopsie 1 0 1536 1880 5096 colord 1 0 3740 4217 7936 root 54 0 148668 180911 345132 izzy 47 0 370928 437562 915056 Edit: Just added two graphs from my monitoring system. Interesting to see: everytime when there's a "jump" in memory consumption, CPU peaks as well. Just found this right now -- and it reminds me of another indicator pointing to X itself: Often when returning to my machine and unlocking the screen, I found something doing heavvy work on my CPU. Checking with top, it always turned out to be /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none. So after this long explanation, finally my questions: What could be the possible causes? How can I better identify involved processes/applications? What steps could be taken to avoid this behaviour -- short from rebooting the machine all X days? I was running 8.04 (Hardy) for about 5 years on my old machine, never having experienced the like (always more than 100 days uptime, before rebooting for e.g. kernel updates). This now is a complete new machine with a fresh install of 8.04. In case it matters, some specs: AMD A4-3400 APU with Radeon(tm) HD Graphics, using the open-source ati/radeon driver (so no fglrx installed), 8GB RAM, WDC WD1002FAEX-0 hdd (1TB), Asus F1A75-V Evo mainboard. Ubuntu 12.04 64-bit with KDE4/Plasma. Apps usually open more or less permanently include Evolution, Firefox, konsole (with Midnight Commander running inside, about 4 tabs), and LibreOffice -- plus occasionally Calibre, Gimp and Moneyplex (banking software I'm already using for almost 20 years now, in a version which did fine on Hardy).

    Read the article

  • Oracle Exadata Resource Kit available

    - by javier.puerta(at)oracle.com
    To learn more about how easy it is to achieve extreme database application performance, we now invite you to access the Oracle Exadata Resource Kit, featuring: The Oracle Exadata Launch Webcast with Mark Hurd, President, Oracle IDC's report on how Oracle Exadata exceeds expectations A technical overview of Oracle Exadata Database Machine Customer case studies, videos, podcasts, and more Don't miss this chance to learn how Oracle Exadata provides extreme performance by combining data warehousing and online transaction processing applications in a single machine. Access the Oracle Exadata Resource Kit today.

    Read the article

  • Learning MVC for a JSP Resource and ASP.Net WebForms Resource

    - by Lijo
    Statement from a colleque: - "People with ASP.Net WebForms skills should be able to learn it easily as the fundamental concept is same.” Consider two people –one from JSP background and other from ASP.Net WebForms background. Now both need to learn ASP.Net MVC in RAZOR. Do you think the person from ASP.Net Webforms background has significant advantage over the person from JSP background? My feeling is – it is equally difficult for JSP person and ASP.Net Webforms person to learn MVC with RAZOR. What is your take on it? Any statistics that you can provide for this?

    Read the article

  • How to deploy jBPM 3.2.2 console on Oracle 10g iAS

    - by Balint Pato
    Hi! Does anybody have experience regarding deployment of the jBPM Administration Console on Oracle 10g iAS? I successfully deployed it using an .ear, security mappings working, I can even login to the console, Hibernate finds the JNDI datasource but it cannot find the TransactionManager. I see no log, only the exception thrown in the jsf page: Can anybody help me? The hibernate.cfg.xml file now looks like this: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- hibernate dialect --> <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property> <!-- JDBC connection properties (begin) === <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property> <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property> <property name="hibernate.connection.username">sa</property> <property name="hibernate.connection.password"></property> ==== JDBC connection properties (end) --> <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> <!-- DataSource properties (begin) --> <property name="hibernate.connection.datasource">java:/JbpmDS</property> <!-- DataSource properties (end) --> <!-- JTA transaction properties (begin) --> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <!-- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>--> <!-- JTA transaction properties (end) --> <!-- CMT transaction properties (begin) === <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property> <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property> ==== CMT transaction properties (end) --> <!-- logging properties (begin) --> <property name="hibernate.show_sql">true</property> <property name="hibernate.format_sql">true</property> <property name="hibernate.use_sql_comments">true</property> <--==== logging properties (end) --> <!-- ############################################ --> <!-- # mapping files with external dependencies # --> <!-- ############################################ --> <!-- following mapping file has a dependendy on --> <!-- 'bsh-{version}.jar'. --> <!-- uncomment this if you don't have bsh on your --> <!-- classpath. you won't be able to use the --> <!-- script element in process definition files --> <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/> <!-- following mapping files have a dependendy on --> <!-- 'jbpm-identity.jar', mapping files --> <!-- of the pluggable jbpm identity component. --> <!-- Uncomment the following 3 lines if you --> <!-- want to use the jBPM identity mgmgt --> <!-- component. --> <!-- identity mappings (begin) --> <mapping resource="org/jbpm/identity/User.hbm.xml"/> <mapping resource="org/jbpm/identity/Group.hbm.xml"/> <mapping resource="org/jbpm/identity/Membership.hbm.xml"/> <!-- identity mappings (end) --> <!-- following mapping files have a dependendy on --> <!-- the JCR API --> <!-- jcr mappings (begin) === <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/> ==== jcr mappings (end) --> <!-- ###################### --> <!-- # jbpm mapping files # --> <!-- ###################### --> <!-- hql queries and type defs --> <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" /> <!-- graph.action mapping files --> <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/> <!-- graph.def mapping files --> <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/> <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/> <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/> <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/> <!-- graph.node mapping files --> <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/> <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/> <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/> <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/> <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/> <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/> <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/> <mapping resource="org/jbpm/graph/node/State.hbm.xml"/> <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/> <!-- context.def mapping files --> <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/> <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/> <!-- taskmgmt.def mapping files --> <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/> <!-- module.def mapping files --> <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/> <!-- bytes mapping files --> <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/> <!-- file.def mapping files --> <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/> <!-- scheduler.def mapping files --> <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/> <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/> <!-- graph.exe mapping files --> <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/> <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/> <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/> <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/> <!-- module.exe mapping files --> <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/> <!-- context.exe mapping files --> <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/> <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/> <!-- job mapping files --> <mapping resource="org/jbpm/job/Job.hbm.xml"/> <mapping resource="org/jbpm/job/Timer.hbm.xml"/> <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/> <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/> <!-- taskmgmt.exe mapping files --> <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/> <!-- logging mapping files --> <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/> <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/> <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/> </session-factory> </hibernate-configuration> ---- edit --- I have already tried the hibernate.transaction.manager_lookup_class to set to the JBoss version (org.hibernate.transaction.JBossTransactionManagerLookup) it did not work...well it's not that suprising...I'll try now: org.hibernate.transaction.OC4JTransactionManagerLookup I tried with CMT instead of JTA, but it didn't work also.

    Read the article

  • Looking for merge tool with very good in-line-comparison support

    - by peter p
    I have seen this topic discussed several times, but emphasis is on "very good in-line-comparison" here, which was not really covered by those threads. E.g. I would like the tool to recognize and highlight that the resource "colorpicker_newstring" has been added when comparing the following two blocks. WinMerge and Kdiff both fail... Does anyone know a software that does not? I am using Windows. Ah, and I'd prefer free/OS software, of course. Thanks a lot in advance, Peter File A: <resource name="colorpicker_title">Color picker</resource> <resource name="colorpicker_apply">Apply</resource> <resource name="colorpicker_transparent">Transparent</resource> <resource name="colorpicker_htmlcolor">HTML color</resource> <resource name="colorpicker_red">Red</resource> <resource name="colorpicker_newstring">New String</resource> <resource name="colorpicker_green">Green</resource> <resource name="colorpicker_blue">Blue</resource> <resource name="colorpicker_alpha">Alpha</resource> <resource name="colorpicker_recentcolors">Recently used colors</resource> File B: <resource name="colorpicker_title">Sélecteur de couleur</resource> <resource name="colorpicker_apply">Appliquer</resource> <resource name="colorpicker_transparent">Transparent</resource> <resource name="colorpicker_htmlcolor">Couleur HTML</resource> <resource name="colorpicker_red">Rouge</resource> <resource name="colorpicker_green">Vert</resource> <resource name="colorpicker_blue">Bleu</resource> <resource name="colorpicker_alpha">Alpha</resource> <resource name="colorpicker_recentcolors">Couleurs récentes</resource>

    Read the article

  • Centralizing a resource file among multiple projects in one solution (C#/WPF)

    - by MarkPearl
    One of the challenges one faces when doing multi language support in WPF is when one has several projects in one solution (i.e. a business layer & ui layer) and you want multi language support. Typically each solution would have a resource file – meaning if you have 3 projects in a solution you will have 3 resource files.   For me this isn’t an ideal solution, as you normally want to send the resource files to a translator and the more resource files you have, the more fragmented the dictionary will be and the more complicated it will be for the translator. This can easily be overcome by creating a single project that just holds your translation resources and then exposing it to the other projects as a reference as explained in the following steps. Step 1 Step 1 -  Add a class library to your solution that will contain just the resource files. Your solution will now have an additional project as illustrated below. Step 2 Reference this project to the other projects. Step 3 Move all the resources from the other resource files to the translation projects resource file. Step 4 Set the translations projects resource files access modifier to public. Step 5 Reference all other projects to use the translation resource file instead of their local resource file. To do this in xaml you would need to expose the project as a namespace at the top of the xaml file… note that the example below is for a project called MaxCutLanguages – you need to put the correct project name in its place.   xmlns:MaxCutLanguages="clr-namespace:MaxCutLanguages;assembly=MaxCutLanguages"   And then in the actual xaml you need to replace any text with a reference to the resource file. <TextBlock Text="{x:Static MaxCutLanguages:Properties.Resources.HelloWorld}"/> End Result You can now delete all the resource files in the other projects as you now have one centralized resource file.

    Read the article

  • Object pools for efficient resource management

    - by GameDevEnthusiast
    How can I avoid using default new() to create each object? My previous demo had very unpleasant framerate hiccups during dynamic memory allocations (usually, when arrays are resized), and creating lots of small objects which often contain one pointer to some DirectX resource seems like an awful lot of waste. I'm thinking about: Creating a master look-up table to refer to objects by handles (for safety & ease of serialization), much like EntityList in source engine Creating a templated object pool, which will store items contiguously (more cache-friendly, fast iteration, etc.) and the stored elements will be accessed (by external systems) via the global lookup table. The object pool will use the swap-with-last trick for fast removal (it will invoke the object's ~destructor first) and will update the corresponding indices in the global table accordingly (when growing/shrinking/moving elements). The elements will be copied via plain memcpy(). Is it a good idea? Will it be safe to store objects of non-POD types (e.g. pointers, vtable) in such containers? Related post: Dynamic Memory Allocation and Memory Management

    Read the article

  • Resource Acquisition is Initialization in C#

    - by codeWithoutFear
    Resource Acquisition Is Initialization (RAII) is a pattern I grew to love when working in C++.  It is perfectly suited for resource management such as matching all those pesky new's and delete's.  One of my goals was to limit the explicit deallocation statements I had to write.  Often these statements became victims of run-time control flow changes (i.e. exceptions, unhappy path) or development-time code refactoring. The beauty of RAII is realized by tying your resource creation (acquisition) to the construction (initialization) of a class instance.  Then bind the resource deallocation to the destruction of that instance.  That is well and good in a language with strong destructor semantics like C++, but languages like C# that run on garbage-collecting runtimes don't provide the same instance lifetime guarantees. Here is a class and sample that combines a few features of C# to provide an RAII-like solution: using System; namespace RAII { public class DisposableDelegate : IDisposable { private Action dispose; public DisposableDelegate(Action dispose) { if (dispose == null) { throw new ArgumentNullException("dispose"); } this.dispose = dispose; } public void Dispose() { if (this.dispose != null) { Action d = this.dispose; this.dispose = null; d(); } } } class Program { static void Main(string[] args) { Console.Out.WriteLine("Some resource allocated here."); using (new DisposableDelegate(() => Console.Out.WriteLine("Resource deallocated here."))) { Console.Out.WriteLine("Resource used here."); throw new InvalidOperationException("Test for resource leaks."); } } } } The output of this program is: Some resource allocated here. Resource used here. Unhandled Exception: System.InvalidOperationException: Test for resource leaks. at RAII.Program.Main(String[] args) in c:\Dev\RAII\RAII\Program.cs:line 40 Resource deallocated here. Code without fear! --Don

    Read the article

  • Advantages And Disadvantages Of Resource Serialization

    - by CPP_Person
    A good example is let's say I'm making a pong game. I have a PNG image for the ball and another PNG image for the paddles. Now which would be better, loading the PNG images with a PNG loader, or loading them in a separate program, serializing it, and de-serializing it in the game itself for use? The reason why this may be good to know is because it seems like game companies (or anyone in the long run) build all of their resources into some sort of file. For example, in the game Fallout: New Vegas the DLCs are loaded as a .ESM file, which includes everything it needs, all the game does is find it, serialize it, and it has the resources. Games like Penumbra: Black Plague take a different approch and add a folder which contains all the textures, sounds, scrips, ect that it needs, but not serialized (it does this with the game itself, and the DLC). Which is the better approch and why?

    Read the article

  • C++ and SDL resource management for 2D game

    - by KuruptedMagi
    My first question is about stateManagers. I do not use the singleton pattern (read many random posts with various reasons not to use it), I have gameStateManager which runs the pointer cCurrentGameState-render(), etc. I want to make a transitioning game, this engine should ideally cover both a platformer and a bird's eye RPG (with some recoding, I just mean the base engine), both of which will load different levels and events, such as world map, dungeon, shops, etc. So I then thought, rather then having to store all this data within all the states, I would break the engine into gameStates, and playStates... when gameState reaches gameStatePlay(), gameStatePlay simply runs the usual handleInput, logic, and render for the playStates, just as the low level gameStateManager does. This lets me store all the player data within the base playstate class without storing useless data in the gameStates. Now I have added a seperate mapEditor, which uses editorStates from gameStateEditor. Is this too much usage of the gameState concept? It seems to work pretty well for me, so I was wondering if I am too far off a common implementation of this. My second question is on image resources. I have my sprite class with nothing but static members, mainly loadImage, applySurface, and my screen pointer. I also have a map pairing imageName enums with actual SDL_Surface pointers, and one pairing clipNumber enums with a wrapper class for a vector of clips, so that each reference in the map can have different amounts of clips with different sizes. I thought it would be better to store all these images, and screen within one static body, since 20 different goblins all use the same sprite sheet, and all need to print to the same screen, and of course, this way I do not need to pass my screen reference to every little entity. The imageMap seems to work very well, I can even add the ability to search through the map at creation of entity type to see if a particular image at creation, creating if it doesnt exist, and destroying the image if the last entity that needs it was just destroyed. The vectored clip map however, seems to take too long to initialize, so if i run past the state that initializes them to fast, the game crashes <. Plus, the clip map call is half of this line =P SPRITE::applySurface( cEditorMap.cTiles[x][y].iX, cEditorMap.cTiles[x][y].iY, SPRITE::mImages[ IMAGE_TILEMAP ], SPRITE::screen, SPRITE::mImageClips[IMAGE_TILEMAP]->clips.at( cEditorMap.cTiles[x][y].iTileType ) ); Again, do I have the right idea? I like the imageMap, but am I better off with each entity storing its own clips? My last question is about collision detection. I only grasp the basics, will look at per-pixel and circular soon, but how can I determine which side the collision comes from with just the basic square collision detection, I tried breaking each entity into 4 collision zones, but that just gave me problems with walking through walls and the like <. Also, is per-pixel color collision a good way to decide what collision just occured, or is checking multiple colors for multiple entities too taxing each cycle?

    Read the article

  • debugging a resource leak in a printer driver

    - by MK
    I'm trying to debug a memory leak in a printer driver. I'm pretty sure it's a resource leak, not just a plain memory leak because analyzing heap with !heap -s in windbg doesn't show any increase. How do I monitor other kinds of objects with windbg? Number of GDI objects and open handles is not growing either, so what could it be?

    Read the article

  • WmiPrvSE memory leak on Windows 2008 *R2*

    - by MichaelGG
    I've seen references on Windows 2008 to WmiPrvSE leaks, but nothing about Windows 2008 R2. We're running R2 on top of Hyper-V (2008). We are also running NSClient++ for monitoring from opsview. Over time, WmiPrvSE.exe starts to use a lot of memory, causing memory alert issues (less than 10% free). VM has 2GB, WmiPrvSE consumes up to 500-600MB before I kill it. Killing the process doesn't seem to have any negative effect; it starts up again and I haven't noticed any problems. But after a day or two, it's back in the same situation. Any ideas on what to do? Resource Monitor doesn't show any Disk or Network IO by WmiPrvSE.exe. Just slowly climbing private memory... Edited to add: We aren't running clustering, or Windows System Resource Manager. The only regular WMI user I can guess is NSClient++, but we don't seem to have this problem on other servers.

    Read the article

  • DD-WRT Connection Leak

    - by Nerdfest
    I have DD-WRT installed on a WRT54G v1.1, and a few of the features seem to cause connections to leak. I've configured it for 1024 connections with TCP/UDP timeouts of 180/30. I've tried higher values as well. Anyway, if I use the Bandwidth tab to monitor the bandwidth usage, the number of connections to my workstation reaches about 450. Is this normal? If not, any idea how to get the connections to either not be created, or to drop much faster?

    Read the article

  • lsass.exe memory leak on windows 2003 server

    - by thelsdj
    In the past month or so I noticed that lsass.exe has started to leak memory, getting to 500MB+ of ram in under a week after reboot. Before this I had never noticed it using any significant amount of memory compared to other processes on the system. This is happening on 2 identical servers, neither of which has anything to do with Active Directory. Maybe a recent Windows Update has caused this? Any thoughts on things to check? As a side question is there some way to recycle the memory usage of lsass.exe without rebooting? Edit: Here is what I'm seeing in Process Monitor, there are thousands of registry open/query/close a minute from lsass.exe. How can I track down what is triggering these?

    Read the article

  • Memeory Leak in Windows Page file when calling a shell command

    - by Arno
    I have an issue on our Windows 2003 x64 Build Server when invoking shell commands from a script. Each call causes a "memory leak" in the page file so it grows quite rapidly until it reaches the maximum and the machine stops working. I can reproduce the problem very nicely by running a perl script like for ($count=1; $count<5000; $count++) { system "echo huhu"; } It is independent of he scripting language as the same happens with lua: for i=1,5000 do os.execute("echo huhu") end I found somebody describing the same issue with php at http://www.issociate.de/board/post/454835/Memory_leak_occurs_when_exec%28%29_function_is_used_on_Windows_platform.html His solution: Firewall/Virus Scanner does not apply, neither are running on the machine. We can also reproduce the issue on other Developer Machines running XP 64, but not on XP 32 Bit. The guilty guy for the allocation is C:\WINDOWS\System32\svchost.exe -k netsvcs which runs all the basic Windows services. Does anybody know the issue and how to resolve it ?

    Read the article

  • Ubuntu: Memory Leak

    - by Keener
    I'm having trouble finding from where this memory leak is occurring. I'm running Ubuntu 8.04 LTS on a Dell XPS M1530. I have 3GB of ram and I'm finding after about an hour or so of use top shows me 2GBs+ used. The strange thing is when I add up the memory percentages by PID either from top or ps aux I find that I should only be using about 20-25% of my available ram. What brought this to my attention was I've begun running vmware server again. Now, obviously the ram usage spikes when I load a virtual machine, but the memory VMware is using does not account for the memory usage I'm seeing via top or free. Stopping vmware server releases the memory which was allocated to it, but I'm still unable to find where this RAM is being used. After a complete reboot, of course, the memory is fine, but very quickly it climbs to 60-80% usage with the processes only appearing to account for a third of that. Any ideas where I should look for more information on what this could be?

    Read the article

  • DIY Leak Detector Prevents Water Damage

    - by Jason Fitzpatrick
    There’s no need to shell out for an expensive commercial leak detector when you can cobble together a simple one from basic parts. Over at Make Magazine, Electrical Engineer Jeff Tegre shares a straight forward guide to cobbling together a simple leak detector. Armed with the leak detector you can get an early alert if you water heater, washer, or other leak-prone appliances are hemorrhaging water. Make a Leak Detector for $25 [Make] Amazon’s New Kindle Fire Tablet: the How-To Geek Review HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS Use Your Android Phone to Comparison Shop: 4 Scanner Apps Reviewed

    Read the article

  • SCHA API for resource group failover / switchover history

    - by krishna.k.murthy
    The Oracle Solaris Cluster framework keeps an internal log of cluster events, including switchover and failover of resource groups. These logs can be useful to Oracle support engineers for diagnosing cluster behavior. However, till now, there was no external interface to access the event history. Oracle Solaris Cluster 4.2 provides a new API option for viewing the recent history of resource group switchovers in a program-parsable format. Oracle Solaris Cluster 4.2 provides a new option tag argument RG_FAILOVER_LOG for the existing API command scha_cluster_get which can be used to list recent failover / switchover events for resource groups. The command usage is as shown below: # scha_cluster_get -O RG_FAILOVER_LOG number_of_days number_of_days : the number of days to be considered for scanning the historical logs. The command returns a list of events in the following format. Each field is separated by a semi-colon [;]: resource_group_name;source_nodes;target_nodes;time_stamp source_nodes: node_names from which resource group is failed over or was switched manually. target_nodes: node_names to which the resource group failed over or was switched manually. There is a corresponding enhancement in the C API function scha_cluster_get() which uses the SCHA_RG_FAILOVER_LOG query tag. In the example below geo-infrastructure (failover resource group), geo-clusterstate (scalable resource group), oracle-rg (failover resource group), asm-dg-rg (scalable resource group) and asm-inst-rg (scalable resource group) are part of Geographic Edition setup. # /usr/cluster/bin/scha_cluster_get -O RG_FAILOVER_LOG 3 geo-infrastructure;schost1c;;Mon Jul 21 15:51:51 2014 geo-clusterstate;schost2c,schost1c;schost2c;Mon Jul 21 15:52:26 2014 oracle-rg;schost1c;;Mon Jul 21 15:54:31 2014 asm-dg-rg;schost2c,schost1c;schost2c;Mon Jul 21 15:54:58 2014 asm-inst-rg;schost2c,schost1c;schost2c;Mon Jul 21 15:56:11 2014 oracle-rg;;schost2c;Mon Jul 21 15:58:51 2014 geo-infrastructure;;schost2c;Mon Jul 21 15:59:19 2014 geo-clusterstate;schost2c;schost2c,schost1c;Mon Jul 21 16:01:51 2014 asm-inst-rg;schost2c;schost2c,schost1c;Mon Jul 21 16:01:10 2014 asm-dg-rg;schost2c;schost2c,schost1c;Mon Jul 21 16:02:10 2014 oracle-rg;schost2c;;Tue Jul 22 16:58:02 2014 oracle-rg;;schost1c;Tue Jul 22 16:59:05 2014 oracle-rg;schost1c;schost1c;Tue Jul 22 17:05:33 2014 Note that in the output some of the entries might have an empty string in the source_nodes. Such entries correspond to events in which the resource group is switched online manually or during a cluster boot-up. Similarly, an empty destination_nodes list indicates an event in which the resource group went offline. - Arpit Gupta, Harish Mallya

    Read the article

  • Unmanaged Code calling leads to heavy memory leak!!

    - by konnychen
    Maybe I need change the title as "Unmanaged Code calling leads to heavy memory leak!" The leak is around 30M/hour I think maybe I need complete my code here because the memory leak maybe not from a static string whereas my real code derive this string from external device (see new code attached). so I handle also unmanaged code. Could it be possible the leak comes from unmanaged code? But I freed the resouce by Marshal.FreeCoTaskMem(pos); oThread2 = new Thread(new ThreadStart(Cyclic_Call)); oThread2.Start(); delegate void SetText_lab_Statubar(string text); private void m_SetText_lab_Statubar(string text) { if (this.lab_Statubar.InvokeRequired) { SetText_lab_Statubar d = new SetText_lab_Statubar(m_SetText_lab_Statubar); this.Invoke(d, new object[] { text }); } else { this.lab_Statubar.Text = text; } } private void Cyclic_Call() { do { //... ... ReadMatrixCode(Station6, 0, str_Code); this.m_SetText_lab_Statubar(str_Code[4]); Thread.Sleep(100); } while (!b_AbortThraed); } private void ReadMatrixCode(Station st, int ItemNr, string[] str_Code) { IntPtr pItemStates = IntPtr.Zero; IntPtr pErrors = IntPtr.Zero; int NumItems = itemServerHandles.Length; m_SyncIO.Read(DataSrc, NumItems, itemServerHandles, out pItemStates, out pErrors); // This calls external dll which has some of "out IntPtr" errors = new int[NumItems]; Marshal.Copy(pErrors, errors, 0, NumItems); IntPtr pos = pItemStates; // Now get the read values and check errors for (int dwCount = 0; dwCount < NumItems; dwCount++) { result[dwCount] = (ITEMSTATE)Marshal.PtrToStructure(pos, typeof(ITEMSTATE)); pos = (IntPtr)(pos.ToInt32() + Marshal.SizeOf(typeof(ITEMSTATE))); } // Free allocated COM-ressouces Marshal.FreeCoTaskMem(pItemStates); Marshal.FreeCoTaskMem(pErrors); pItemStates = IntPtr.Zero; pErrors = IntPtr.Zero; } m_syncIO is a class and finally it will call COM component which is defined below [Guid("39C12B52-011E-11D0-9675-1020AFD8ADB3")] [InterfaceType(1)] [ComConversionLoss] public interface ISyncIO { void Read(DATASOURCE dwSource, int dwCount, int[] phServer, out IntPtr ppItemValues, out IntPtr ppErrors); void Write(int dwCount, int[] phServer, object[] pItemValues, out IntPtr ppErrors); }

    Read the article

  • Logging with Resource Monitor?

    - by Jay White
    I am having sudden spikes in disk read activity, which can tie up my system for a few seconds at a time. I would like to figure out the cause of this before I set my machine to go live. With Performance Monitor I know I can log activity, but this does not show me individual processes that cause a spike. Resource Monitor allows me to see processes, but I have no way to keep logs. It seems unless I have Resource Monitor open at the time of a spike, I will not be able to identify the process causing the spike. Can someone suggest a way to log with Resource Monitor, or an alternative tool that can?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >