.jsp
file.. When JavaFX MediaBox is called from an .html
file, no problem shows up...jsp
file.. When JavaFX MediaBox is called from an .html
file, no problem shows up..Main.fx
in MediaBox project as follows:
var mediaUrl = FX.getArgument("mediaUrl");
// in order to access mediaUrl, use mediaUrl.toString()
index.jsp
as follows:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<script src="http://dl.javafx.com/dtfx.js"></script>
<script>
javafx(
{
archive: "MediaBox.jar",
width: 640,
height: 360,
code: "com.sun.javafx.mediabox.Main",
name: "MediaBox"
}, {
mediaUrl: "http://sun.edgeboss.net/download/sun/media/1460825906/1460825906_2956241001_big-buck-bunny-640x360.flv"
/*"file:/E:/htarakci/WORKSTATION/tez/projects/lost.avi"*/
}
);
</script>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
Main.fx
code as follows:
package com.sun.javafx.mediabox;
import javafx.stage.*;
import javafx.scene.*;
import com.sun.javafx.mediabox.MediaBox;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
/**
* @author baechul
*/
var mediaUrl = //"file:/C:/hilaltarakci/WORKSTATION/workspace/WebClient/lost.avi";
"http://sun.edgeboss.net/download/sun/media/1460825906/1460825906_2956241001_big-buck-bunny-640x360.flv";
var mediaTitle = "Lost Movie Sample";
var mediaDescription = "a sample scene from loast movie...";
var startTime = 404444;
var stopTime = 424444;
var theme = getFXArgString("theme", "paranara");
var mediaViewWidth = getFXArgInt("mediaViewWidth", 640);
var mediaViewHeight = getFXArgInt("mediaViewHeight", 360);
var mediaBox:MediaBox = MediaBox {
// set the current profile
// media and play variables
mediaSource:mediaUrl
mediaTitle: mediaTitle
mediaDescription: mediaDescription
autoPlay: true // default: false
preserveRatio: true // default: true
// size and layout position
width: bind mediaBox.scene.width
//width: bind if({__PROFILE__} == "desktop") 640 else 1024;
height: bind mediaBox.scene.height
//height: bind if({__PROFILE__} == "desktop") 360 else 1024;
layoutX: 0;
layoutY: 0;
// view
themeStr: theme // default: "paranara"
mediaControlBarHeight: 25 // default: 25, possible values: 20~50
showMediaInfo: true // default: true
// function variables
onMouseClicked: function(me) {
mediaBox.setVideo(mediaUrl, mediaTitle, mediaDescription, startTime, stopTime);
/*mediaBox.mediaControlBar.mediaPlayer.startTime = Duration.valueOf(startTime);
mediaBox.mediaControlBar.mediaPlayer.stopTime = Duration.valueOf(stopTime);*/
}
onKeyPressed:function(e:KeyEvent):Void {
if ((e.code == KeyCode.VK_BACK_SPACE) or
(e.code == KeyCode.VK_Q) or
(e.code == KeyCode.VK_POWER))
{
FX.exit();
}
}
}
Stage {
title: "MediaBox Player"
resizable: true
scene:Scene {
//width: getFXArgInt("mediaViewWidth", 640)
width: getWidth()
//height: getFXArgInt("mediaViewHeight", 360)
height: getHeight()
content: mediaBox
}
}
mediaBox.requestFocus();
// helper functions
function getWidth(): Number {
if ({__PROFILE__} == "desktop")
return 640
else
return 1280
}
function getHeight(): Number {
if ({__PROFILE__} == "desktop")
return 360
else
return 720
}
function getFXArgString(arg:String, defaultValue:String): String {
var val = FX.getArgument(arg);
if (val == null) {
return defaultValue;
}
return val as String;
}
function getFXArgInt(arg:String, defaultValue:Integer): Integer {
var val = FX.getArgument(arg);
if (val == null) {
return defaultValue;
}
try {
return Integer.parseInt(val as String);
} catch (nfe: java.lang.NumberFormatException) {
return defaultValue;
}
}
MediaBox.fx
:
public function setVideo(url: String, title: String, description: String,
givenStartTime: Integer, givenStopTime: Integer) {
mediaSource = url;
mediaTitle = title;
mediaDescription = description;
mediaControlBar.mediaPlayer.startTime = Duration.valueOf(givenStartTime);
mediaControlBar.mediaPlayer.stopTime = Duration.valueOf(givenStopTime);
}
Failed to access IIS metabase...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i
Start installing ASP.NET (2.0.50727).
......................
Finished installing ASP.NET (2.0.50727).
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -ga aspnet
Start granting aspnet access to the IIS metabase and other directories used by A
SP.NET.
Finished granting aspnet access to the IIS metabase and other directories used b
y ASP.NET.
DataTable
from a C# web service. So, i have to convert it to ArrayList
before using..
In this post, i tried to summarize Java Persistence API: Best Practices slides prepared by Carol McDonald and available at http://www.slideshare.net/caroljmcdonald/td09jpabestpractices2.
Configure L2 caching for entities that are
protect any data that can be concurrently modified with a locking strategy
Configure Query cache
Navigating Entity Relationships
Data fetching strategy
· EAGER – immediate
· LAZY – loaded only when needed
· LAZY is good for large objects and/or with relationships with deep hierarchies
• Smaller tables use less disk, less memory, can give better performance
> Use as small data types as possible
> use as small primary key as possible
> Vertical Partition:
● split large, infrequently used columns into a separate one-to-one table
• Use good indexing
> Indexes Speed up Querys
> Indexes slow down Updates
> Index columns frequently used in Query Where claus
Mapping Inheritance Hierarchies
• Do not perform expensive and unnecessary operations that are not part of a transaction
> Hurt performance
> Eg. logging – disk write are expensive, resource contention on log
• Do not use transaction when browsing data
> @TransactionAttribute(NOT_SUPPORTED)
There is also a blog entry of the same writer about JPA caching, possibly initiated from the slides at http://www.slideshare.net/caroljmcdonald/td09jpabestpractices2 . (http://blogs.sun.com/carolmcdonald/entry/jpa_caching)
CATALINA_HOME/conf/server.xml
:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
A truncation error was encountered trying to shrink CLOB to length : org.apache.derby.iapi.services.io.DerbyIOException'.
Q. I'm getting data truncation errors, what does that mean?
A. We try to use sensible sizes for the database columns that contain messages and variables in ODE. However if you're manipulating large quantities of data that may not e enough. The solution in that case is to alter the column that's too short to reserve enough database space for your needs.
warning C4996: 'fopen' was declared deprecated
error spawning cmd.exe
In the Options go into Projects and Solutions -> VC++ Directories page and place this rows:
javax.xml.ws.soap.SOAPFaultException: axis2ns2:selectionFailure
shows up, while the process is running in apache ode (tried with versions 1.3.4 and 1.3.5).
<copy>
<from>
<literal>
<ns2:operationResponse>
<ns2:return> </ns2:return>
</ns2:operationResponse>
</literal>
</from>
<to variable="OperationOut" part="parameters"/>
</copy>
the definition:
<xs:complexType name="operationResponse">
<xs:sequence>
<xs:element name="return" type="ns1:returnMessage" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
axis2ns2:selectionFailure
error
<assign name="InitOperation">
<copy>
<from>$OperationWsdlOperationIn.identity/username</from>
<to>$OperationIn.parameters/username</to>
</copy>
<copy>
<from variable="OperationWsdlOperationIn" part="password"/>
<to>$OperationIn.parameters/password</to>
</copy>
</assign>
<copy>
<from>
<literal>
<ns2:operation>
<username> </username>
<password> </password>
</ns2:operation>
</literal>
</from>
<to variable="OperationIn" part="parameters"/>
</copy>
<xs:complexType name="operation">
<xs:sequence>
<xs:element name="username" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="password" type="xs:string" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
Q. My process fails with a selectionFailure; What can I do? A. BPEL expects a single element to be selected when evaluating
If you get zero element, double-check your namespace prefix and bindings. Also, remember that you must initialize your variables (most often with
This links say that it is due to namespace error:
http://stackoverflow.com/questions/4498982/soap-exception-axis2ns2selectionfailure
http://old.nabble.com/assign-with-complex-types-td20919141.html
Solution:
The following assignment lucily solved the error:
<copy>
<from>
<literal>
<operation
xmlns="">
<username> </username>
<password> </password>
</operation>
</literal>
</from>
<to variable="OperationIn" part="parameters"/>
</copy>
javax.xml.ws.soap.SOAPFaultException: axis2ns1:selectionFailure
errors from some of my processes..